diff --git a/internal/storage/options.go b/internal/storage/options.go index 2c1cf9302..ce05244ef 100644 --- a/internal/storage/options.go +++ b/internal/storage/options.go @@ -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 diff --git a/internal/storage/plugin/client.go b/internal/storage/plugin/client.go index 923842208..a3fc9b2c3 100644 --- a/internal/storage/plugin/client.go +++ b/internal/storage/plugin/client.go @@ -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) diff --git a/internal/storage/plugin/ids.go b/internal/storage/plugin/ids.go index feba9e3d5..74f4d6ee4 100644 --- a/internal/storage/plugin/ids.go +++ b/internal/storage/plugin/ids.go @@ -20,7 +20,6 @@ func init() { } } -// PublicId prefixes for the resources in the plugin package. const ( Subtype = subtypes.Subtype("plugin") ) diff --git a/internal/storage/plugin/options.go b/internal/storage/plugin/options.go index 46eaeaa89..769244f6f 100644 --- a/internal/storage/plugin/options.go +++ b/internal/storage/plugin/options.go @@ -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 diff --git a/internal/storage/storage.go b/internal/storage/storage.go index 4623fb0fe..a1243f034 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -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) }