test

package
v0.0.0-...-5aeb486 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package test provides in-memory intended-for-testing implementations of storage package interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	// contains filtered or unexported fields
}

func NewKey

func NewKey() *Key

NewKey returns a Key which stores keys in memory only, suitable for testing.

func (*Key) BatchSigningKeys

func (k *Key) BatchSigningKeys() map[LocalityIngestor]key.Key

Test-only functions. Not goroutine-safe.

func (*Key) GetBatchSigningKey

func (k *Key) GetBatchSigningKey(ctx context.Context, locality, ingestor string) (key.Key, error)

func (*Key) GetPacketEncryptionKey

func (k *Key) GetPacketEncryptionKey(ctx context.Context, locality string) (key.Key, error)

func (*Key) PacketEncryptionKeys

func (k *Key) PacketEncryptionKeys() map[string]key.Key

func (*Key) PutBatchSigningKey

func (k *Key) PutBatchSigningKey(ctx context.Context, locality, ingestor string, key key.Key) error

Standard storage.Key functions. Safe for concurrent access from multiple goroutines.

func (*Key) PutPacketEncryptionKey

func (k *Key) PutPacketEncryptionKey(ctx context.Context, locality string, key key.Key) error

type LocalityIngestor

type LocalityIngestor struct{ Locality, Ingestor string }

LocalityIngestor represents a (locality, ingestor) tuple.

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

func NewManifest

func NewManifest() *Manifest

NewManifest returns a Manifest which stores manifests in memory only, suitable for testing.

func (*Manifest) GetDataShareProcessorSpecificManifest

func (m *Manifest) GetDataShareProcessorSpecificManifest(_ context.Context, dspName string) (manifest.DataShareProcessorSpecificManifest, error)

func (*Manifest) GetDataShareProcessorSpecificManifestPutCount

func (m *Manifest) GetDataShareProcessorSpecificManifestPutCount(dspName string) int

func (*Manifest) GetDataShareProcessorSpecificManifests

func (m *Manifest) GetDataShareProcessorSpecificManifests() map[string]manifest.DataShareProcessorSpecificManifest

Test-only functions. NOT goroutine-safe.

func (*Manifest) GetIngestorGlobalManifest

func (m *Manifest) GetIngestorGlobalManifest(ctx context.Context) (manifest.IngestorGlobalManifest, error)

func (*Manifest) GetIngestorGlobalManifestPutCount

func (m *Manifest) GetIngestorGlobalManifestPutCount() int

func (*Manifest) PutDataShareProcessorSpecificManifest

func (m *Manifest) PutDataShareProcessorSpecificManifest(_ context.Context, dspName string, manifest manifest.DataShareProcessorSpecificManifest) error

Standard storage.Manifest functions. Safe for concurrent access from multiple goroutines.

func (*Manifest) PutIngestorGlobalManifest

func (m *Manifest) PutIngestorGlobalManifest(_ context.Context, manifest manifest.IngestorGlobalManifest) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL