Documentation
¶
Index ¶
- func NewFromCmdlineOptions() plugin.Plugin
- type BlobStoreS3
- func (d *BlobStoreS3) Bucket() string
- func (d *BlobStoreS3) Client() *s3.Client
- func (d *BlobStoreS3) Get(ctx context.Context, key string) ([]byte, error)
- func (b *BlobStoreS3) GetCommitTimestamp(ctx context.Context) (int64, error)
- func (d *BlobStoreS3) Put(ctx context.Context, key string, value []byte) error
- func (b *BlobStoreS3) SetCommitTimestamp(ctx context.Context, ts int64) error
- func (d *BlobStoreS3) Start() error
- func (d *BlobStoreS3) Stop() error
- type BlobStoreS3OptionFunc
- func WithBucket(bucket string) BlobStoreS3OptionFunc
- func WithLogger(logger *slog.Logger) BlobStoreS3OptionFunc
- func WithPrefix(prefix string) BlobStoreS3OptionFunc
- func WithPromRegistry(registry prometheus.Registerer) BlobStoreS3OptionFunc
- func WithRegion(region string) BlobStoreS3OptionFunc
- func WithTimeout(timeout time.Duration) BlobStoreS3OptionFunc
- type S3Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromCmdlineOptions ¶
Types ¶
type BlobStoreS3 ¶
type BlobStoreS3 struct {
// contains filtered or unexported fields
}
BlobStoreS3 stores data in an AWS S3 bucket
func New ¶
func New( dataDir string, logger *slog.Logger, promRegistry prometheus.Registerer, ) (*BlobStoreS3, error)
New creates a new S3-backed blob store and dataDir must be "s3://bucket" or "s3://bucket/prefix"
func NewWithOptions ¶
func NewWithOptions(opts ...BlobStoreS3OptionFunc) (*BlobStoreS3, error)
NewWithOptions creates a new S3-backed blob store using options.
func (*BlobStoreS3) GetCommitTimestamp ¶
func (b *BlobStoreS3) GetCommitTimestamp(ctx context.Context) (int64, error)
func (*BlobStoreS3) SetCommitTimestamp ¶
func (b *BlobStoreS3) SetCommitTimestamp(ctx context.Context, ts int64) error
func (*BlobStoreS3) Start ¶
func (d *BlobStoreS3) Start() error
Start implements the plugin.Plugin interface.
func (*BlobStoreS3) Stop ¶
func (d *BlobStoreS3) Stop() error
Stop implements the plugin.Plugin interface.
type BlobStoreS3OptionFunc ¶
type BlobStoreS3OptionFunc func(*BlobStoreS3)
func WithBucket ¶
func WithBucket(bucket string) BlobStoreS3OptionFunc
WithBucket specifies the S3 bucket name
func WithLogger ¶
func WithLogger(logger *slog.Logger) BlobStoreS3OptionFunc
WithLogger specifies the logger object to use for logging messages
func WithPrefix ¶
func WithPrefix(prefix string) BlobStoreS3OptionFunc
WithPrefix specifies the S3 object prefix
func WithPromRegistry ¶
func WithPromRegistry( registry prometheus.Registerer, ) BlobStoreS3OptionFunc
WithPromRegistry specifies the prometheus registry to use for metrics
func WithRegion ¶
func WithRegion(region string) BlobStoreS3OptionFunc
WithRegion specifies the AWS region
func WithTimeout ¶
func WithTimeout(timeout time.Duration) BlobStoreS3OptionFunc
WithTimeout specifies the timeout for AWS config loading
type S3Logger ¶
type S3Logger struct {
// contains filtered or unexported fields
}
S3Logger is a thin wrapper giving our logger a consistent interface.