Documentation
¶
Index ¶
- func NewFromCmdlineOptions() plugin.Plugin
- type BlobStoreGCS
- func (d *BlobStoreGCS) Bucket() *storage.BucketHandle
- func (d *BlobStoreGCS) Client() *storage.Client
- func (d *BlobStoreGCS) Close() error
- func (b *BlobStoreGCS) GetCommitTimestamp(ctx context.Context) (int64, error)
- func (b *BlobStoreGCS) SetCommitTimestamp(ctx context.Context, timestamp int64) error
- func (d *BlobStoreGCS) Start() error
- func (d *BlobStoreGCS) Stop() error
- type BlobStoreGCSOptionFunc
- type GcsLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFromCmdlineOptions ¶ added in v0.18.0
Types ¶
type BlobStoreGCS ¶
type BlobStoreGCS struct {
// contains filtered or unexported fields
}
BlobStoreGCS stores data in a Google Cloud Storage bucket.
func New ¶
func New( dataDir string, logger *slog.Logger, promRegistry prometheus.Registerer, ) (*BlobStoreGCS, error)
New creates a new GCS-backed blob store.
func NewWithOptions ¶ added in v0.18.0
func NewWithOptions(opts ...BlobStoreGCSOptionFunc) (*BlobStoreGCS, error)
NewWithOptions creates a new GCS-backed blob store using options.
func (*BlobStoreGCS) Bucket ¶
func (d *BlobStoreGCS) Bucket() *storage.BucketHandle
Returns the bucket handle.
func (*BlobStoreGCS) Client ¶
func (d *BlobStoreGCS) Client() *storage.Client
Returns the GCS client.
func (*BlobStoreGCS) GetCommitTimestamp ¶
func (b *BlobStoreGCS) GetCommitTimestamp(ctx context.Context) (int64, error)
func (*BlobStoreGCS) SetCommitTimestamp ¶
func (b *BlobStoreGCS) SetCommitTimestamp( ctx context.Context, timestamp int64, ) error
func (*BlobStoreGCS) Start ¶ added in v0.18.0
func (d *BlobStoreGCS) Start() error
Start implements the plugin.Plugin interface.
func (*BlobStoreGCS) Stop ¶ added in v0.18.0
func (d *BlobStoreGCS) Stop() error
Stop implements the plugin.Plugin interface.
type BlobStoreGCSOptionFunc ¶ added in v0.18.0
type BlobStoreGCSOptionFunc func(*BlobStoreGCS)
func WithBucket ¶ added in v0.18.0
func WithBucket(bucket string) BlobStoreGCSOptionFunc
WithBucket specifies the GCS bucket name
func WithCredentialsFile ¶ added in v0.18.0
func WithCredentialsFile(credentialsFile string) BlobStoreGCSOptionFunc
WithCredentialsFile specifies the path to the service account credentials file
func WithLogger ¶ added in v0.18.0
func WithLogger(logger *slog.Logger) BlobStoreGCSOptionFunc
WithLogger specifies the logger object to use for logging messages
func WithPromRegistry ¶ added in v0.18.0
func WithPromRegistry( registry prometheus.Registerer, ) BlobStoreGCSOptionFunc
WithPromRegistry specifies the prometheus registry to use for metrics
type GcsLogger ¶
type GcsLogger struct {
// contains filtered or unexported fields
}
GcsLogger is a wrapper type to give our logger a consistent interface
func NewGcsLogger ¶
Click to show internal directories.
Click to hide internal directories.