storage

package
v0.0.0-...-047e020 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNumShards = 256
	ShardMask        = DefaultNumShards - 1
	MaxBatchSize     = 100 // Max number of messages per batch during migration
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

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

func NewFileStorage

func NewFileStorage(basePath string, logger *zap.SugaredLogger, shardDepth int) (*FileStorage, error)

func (*FileStorage) MigrateShards

func (fs *FileStorage) MigrateShards(ctx context.Context, oldShardDepth, newShardDepth int) error

func (*FileStorage) Retrieve

func (fs *FileStorage) Retrieve(ctx context.Context, traceID string) ([]*models.MessagePayload, error)

func (*FileStorage) Store

func (fs *FileStorage) Store(ctx context.Context, message *models.MessagePayload) error

type Neo4jService

type Neo4jService interface {
	ExecuteQuery(ctx context.Context, query string, params map[string]interface{}) (neo4j.Result, error)
}

func NewNeo4jService

func NewNeo4jService(config types.ConfigProvider) (Neo4jService, error)

type RedshiftService

type RedshiftService interface {
	ExecuteQuery(query string) error
}

func NewRedshiftService

func NewRedshiftService(config types.ConfigProvider) (RedshiftService, error)

type S3Service

type S3Service interface {
	UploadFile(ctx context.Context, key string, content []byte, traceID string) (string, error)
	GetFile(ctx context.Context, key string) ([]byte, error)
}

func NewS3Service

func NewS3Service(configProvider types.ConfigProvider) (S3Service, error)

Jump to

Keyboard shortcuts

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