docs(storage): Update comments
This commit is contained in:
1 parent
f53d65eacd
commit
f0e95d7267
5 files changed
+9
-7
No files matched your search
@@ -8,7 +8,8 @@ type SyncMode uint8
|
||||
|
||||
const (
|
||||
// Asynchronous mode will trigger a file to sync to the storage
|
||||
// bucket on a recurring interval once it has been closed.
|
||||
// bucket on a recurring interval once it has been closed. It will continue
|
||||
// retrying until the root container is closed.
|
||||
// Asynchronous is the default sync mode.
|
||||
Asynchronous SyncMode = iota
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
wpbs "github.com/hashicorp/boundary/internal/gen/worker/servers/services"
|
||||
)
|
||||
|
||||
// StorageProxyClient provides a storage related functions that will be sent from a controller
|
||||
// to a worker through a CommandClientProducer to a corresponding storage plugin.
|
||||
// StorageProxyClient provides storage related functions that will be sent from a controller
|
||||
// to a worker through a CommandClientProducer destined for a corresponding storage plugin.
|
||||
type StorageProxyClient interface {
|
||||
// OnCreateStorageBucket is a hook that runs when a storage bucket is created.
|
||||
OnCreateStorageBucket(context.Context, string, *wpbs.OnCreateStorageBucketRequest) (*wpbs.OnCreateStorageBucketResponse, error)
|
||||
|
||||
@@ -20,7 +20,6 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
// PublicId prefixes for the resources in the plugin package.
|
||||
const (
|
||||
Subtype = subtypes.Subtype("plugin")
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ func getDefaultOptions() options {
|
||||
// with a StorageClient. ChunkSize is the number of bytes to
|
||||
// send to the plugin in a single request. If not provided,
|
||||
// the default is 64KiB. The recommended chunk size for
|
||||
// streamed messages is 16KiB to 64KiB.
|
||||
// GRPC streamed messages is 16KiB to 64KiB.
|
||||
func WithChunkSize(chunkSize uint32) Option {
|
||||
return func(o *options) {
|
||||
o.withChunkSize = chunkSize
|
||||
|
||||
@@ -13,9 +13,9 @@ import (
|
||||
plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin"
|
||||
)
|
||||
|
||||
// RecordingStorage can be used to create a FS usable for session recording.
|
||||
// RecordingStorage can be used to create an FS usable for session recording.
|
||||
type RecordingStorage interface {
|
||||
// NewSyncingFS returns a FS that will use local storage as a cache and sync files when they are closed.
|
||||
// NewSyncingFS returns an FS that will use local storage as a cache and sync files when they are closed.
|
||||
NewSyncingFS(ctx context.Context, bucket *storagebuckets.StorageBucket, _ ...Option) (FS, error)
|
||||
|
||||
// NewRemoteFS returns a ReadOnly FS that can be used to retrieve files from a storage bucket.
|
||||
@@ -24,6 +24,8 @@ type RecordingStorage interface {
|
||||
// PluginClients returns a map of storage plugin clients keyed on the plugin name.
|
||||
PluginClients() map[string]plgpb.StoragePluginServiceClient
|
||||
|
||||
// CreateTemp creates a temporary file that is cleaned up when closed. All temp files
|
||||
// are also removed when storage is initialized.
|
||||
CreateTemp(ctx context.Context, p string) (TempFile, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user