Documentation ¶
Index ¶
- type BucketName
- type LocalStorageService
- func (r *LocalStorageService) Delete(ctx context.Context, req *storagepb.StorageDeleteRequest) (*storagepb.StorageDeleteResponse, error)
- func (r *LocalStorageService) Exists(ctx context.Context, req *storagepb.StorageExistsRequest) (*storagepb.StorageExistsResponse, error)
- func (r *LocalStorageService) GetListeners() map[BucketName]map[serviceName]int
- func (r *LocalStorageService) HandleRequest(req *storagepb.ServerMessage) (*storagepb.ClientMessage, error)
- func (r *LocalStorageService) ListBlobs(ctx context.Context, req *storagepb.StorageListBlobsRequest) (*storagepb.StorageListBlobsResponse, error)
- func (r *LocalStorageService) Listen(stream storagepb.StorageListener_ListenServer) error
- func (r *LocalStorageService) PreSignUrl(ctx context.Context, req *storagepb.StoragePreSignUrlRequest) (*storagepb.StoragePreSignUrlResponse, error)
- func (r *LocalStorageService) Read(ctx context.Context, req *storagepb.StorageReadRequest) (*storagepb.StorageReadResponse, error)
- func (s *LocalStorageService) SubscribeToState(fn func(State))
- func (r *LocalStorageService) WorkerCount() int
- func (r *LocalStorageService) Write(ctx context.Context, req *storagepb.StorageWriteRequest) (*storagepb.StorageWriteResponse, error)
- type State
- type StorageOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketName ¶
type BucketName = string
type LocalStorageService ¶
type LocalStorageService struct {
// contains filtered or unexported fields
}
LocalStorageService - A local implementation of the storage and listeners services, bypasses the gateway to forward storage change events directly to listeners.
func NewLocalStorageService ¶
func NewLocalStorageService(opts StorageOptions) (*LocalStorageService, error)
func (*LocalStorageService) Delete ¶
func (r *LocalStorageService) Delete(ctx context.Context, req *storagepb.StorageDeleteRequest) (*storagepb.StorageDeleteResponse, error)
func (*LocalStorageService) Exists ¶
func (r *LocalStorageService) Exists(ctx context.Context, req *storagepb.StorageExistsRequest) (*storagepb.StorageExistsResponse, error)
func (*LocalStorageService) GetListeners ¶
func (r *LocalStorageService) GetListeners() map[BucketName]map[serviceName]int
func (*LocalStorageService) HandleRequest ¶
func (r *LocalStorageService) HandleRequest(req *storagepb.ServerMessage) (*storagepb.ClientMessage, error)
func (*LocalStorageService) ListBlobs ¶
func (r *LocalStorageService) ListBlobs(ctx context.Context, req *storagepb.StorageListBlobsRequest) (*storagepb.StorageListBlobsResponse, error)
func (*LocalStorageService) Listen ¶
func (r *LocalStorageService) Listen(stream storagepb.StorageListener_ListenServer) error
func (*LocalStorageService) PreSignUrl ¶
func (r *LocalStorageService) PreSignUrl(ctx context.Context, req *storagepb.StoragePreSignUrlRequest) (*storagepb.StoragePreSignUrlResponse, error)
func (*LocalStorageService) Read ¶
func (r *LocalStorageService) Read(ctx context.Context, req *storagepb.StorageReadRequest) (*storagepb.StorageReadResponse, error)
TODO: If we move declare here, we can stop attempting to lazily create buckets in the storage service
func (*LocalStorageService) SubscribeToState ¶
func (s *LocalStorageService) SubscribeToState(fn func(State))
func (*LocalStorageService) WorkerCount ¶
func (r *LocalStorageService) WorkerCount() int
func (*LocalStorageService) Write ¶
func (r *LocalStorageService) Write(ctx context.Context, req *storagepb.StorageWriteRequest) (*storagepb.StorageWriteResponse, error)
type State ¶
type State = map[BucketName]map[serviceName]int
type StorageOptions ¶
Click to show internal directories.
Click to hide internal directories.