Documentation ¶
Index ¶
- func NewGRPCServer(options ...grpcOption) *grpc.Server
- func WithGRPCServerOptions(options ...grpc.ServerOption) grpcOption
- func WithGRPCTLSConfig(tlsConfig *tls.Config) grpcOption
- func WithStreamInterceptor(interceptor grpc.StreamServerInterceptor) grpcOption
- func WithUnaryInterceptor(interceptor grpc.UnaryServerInterceptor) grpcOption
- type Option
- type Options
- type Server
- type StorageService
- func (s *StorageService) List(ctx context.Context, req *api.ListRequest) (*api.ListResponse, error)
- func (s *StorageService) Read(req *api.ReadRequest, stream api.Storage_ReadServer) error
- func (s *StorageService) Remove(ctx context.Context, req *api.RemoveRequest) (*api.RemoveResponse, error)
- func (s *StorageService) Rename(ctx context.Context, req *api.RenameRequest) (*api.RenameResponse, error)
- func (s *StorageService) Stat(ctx context.Context, req *api.StatRequest) (*api.StatResponse, error)
- func (s *StorageService) Write(stream api.Storage_WriteServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCServer ¶
func WithGRPCServerOptions ¶
func WithGRPCServerOptions(options ...grpc.ServerOption) grpcOption
func WithGRPCTLSConfig ¶
func WithStreamInterceptor ¶
func WithStreamInterceptor(interceptor grpc.StreamServerInterceptor) grpcOption
func WithUnaryInterceptor ¶
func WithUnaryInterceptor(interceptor grpc.UnaryServerInterceptor) grpcOption
Types ¶
type Option ¶
type Option func(*Options)
func WithPrometheusAddr ¶
func WithPrometheusPort ¶
func WithStoragePath ¶
func WithTLSConfig ¶
type Options ¶
type StorageService ¶
type StorageService struct { api.UnimplementedStorageServer // contains filtered or unexported fields }
func NewStorageService ¶
func NewStorageService(store storage.Storage) *StorageService
func (*StorageService) List ¶
func (s *StorageService) List(ctx context.Context, req *api.ListRequest) (*api.ListResponse, error)
func (*StorageService) Read ¶
func (s *StorageService) Read(req *api.ReadRequest, stream api.Storage_ReadServer) error
func (*StorageService) Remove ¶
func (s *StorageService) Remove(ctx context.Context, req *api.RemoveRequest) (*api.RemoveResponse, error)
func (*StorageService) Rename ¶
func (s *StorageService) Rename(ctx context.Context, req *api.RenameRequest) (*api.RenameResponse, error)
func (*StorageService) Stat ¶
func (s *StorageService) Stat(ctx context.Context, req *api.StatRequest) (*api.StatResponse, error)
func (*StorageService) Write ¶
func (s *StorageService) Write(stream api.Storage_WriteServer) error
Click to show internal directories.
Click to hide internal directories.