Versions in this module Expand all Collapse all v1 v1.1.7 Mar 22, 2021 Changes in this version + const BackendPluginName + var ErrClientInMetadataMode = errors.New("plugin client can not perform action while in metadata mode") + var ErrPluginShutdown = errors.New("plugin is shut down") + var ErrServerInMetadataMode = errors.New("plugin server can not perform action while in metadata mode") + func NewBackend(ctx context.Context, pluginName string, pluginType consts.PluginType, ...) (logical.Backend, error) + func NewPluginClient(ctx context.Context, sys pluginutil.RunnerUtil, ...) (logical.Backend, error) + func Serve(opts *ServeOpts) error + type BackendPluginClient struct + func (b *BackendPluginClient) Cleanup(ctx context.Context) + type GRPCBackendPlugin struct + Factory logical.Factory + Logger log.Logger + MetadataMode bool + func (b *GRPCBackendPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) + func (b GRPCBackendPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error + type GRPCStorageClient struct + func (s *GRPCStorageClient) Delete(ctx context.Context, key string) error + func (s *GRPCStorageClient) Get(ctx context.Context, key string) (*logical.StorageEntry, error) + func (s *GRPCStorageClient) List(ctx context.Context, prefix string) ([]string, error) + func (s *GRPCStorageClient) Put(ctx context.Context, entry *logical.StorageEntry) error + type GRPCStorageServer struct + func (s *GRPCStorageServer) Delete(ctx context.Context, args *pb.StorageDeleteArgs) (*pb.StorageDeleteReply, error) + func (s *GRPCStorageServer) Get(ctx context.Context, args *pb.StorageGetArgs) (*pb.StorageGetReply, error) + func (s *GRPCStorageServer) List(ctx context.Context, args *pb.StorageListArgs) (*pb.StorageListReply, error) + func (s *GRPCStorageServer) Put(ctx context.Context, args *pb.StoragePutArgs) (*pb.StoragePutReply, error) + type LoggerArgs struct + Args []interface{} + Level int + Msg string + type LoggerReply struct + Error error + IsTrue bool + type LoggerServer struct + func (l *LoggerServer) Debug(args *LoggerArgs, _ *struct{}) error + func (l *LoggerServer) Error(args *LoggerArgs, reply *LoggerReply) error + func (l *LoggerServer) Info(args *LoggerArgs, _ *struct{}) error + func (l *LoggerServer) IsDebug(args interface{}, reply *LoggerReply) error + func (l *LoggerServer) IsInfo(args interface{}, reply *LoggerReply) error + func (l *LoggerServer) IsTrace(args interface{}, reply *LoggerReply) error + func (l *LoggerServer) IsWarn(args interface{}, reply *LoggerReply) error + func (l *LoggerServer) Log(args *LoggerArgs, _ *struct{}) error + func (l *LoggerServer) SetLevel(args int, _ *struct{}) error + func (l *LoggerServer) Trace(args *LoggerArgs, _ *struct{}) error + func (l *LoggerServer) Warn(args *LoggerArgs, reply *LoggerReply) error + type NOOPStorage struct + func (s *NOOPStorage) Delete(_ context.Context, key string) error + func (s *NOOPStorage) Get(_ context.Context, key string) (*logical.StorageEntry, error) + func (s *NOOPStorage) List(_ context.Context, prefix string) ([]string, error) + func (s *NOOPStorage) Put(_ context.Context, entry *logical.StorageEntry) error + type ServeOpts struct + BackendFactoryFunc logical.Factory + Logger log.Logger + TLSProviderFunc TLSProviderFunc + type TLSProviderFunc func() (*tls.Config, error)