Documentation
¶
Index ¶
- type Client
- type GRPCBotStoreClient
- func (m *GRPCBotStoreClient) Close() error
- func (m *GRPCBotStoreClient) Delete(key datastore.Key) error
- func (m *GRPCBotStoreClient) Get(key datastore.Key) ([]byte, error)
- func (m *GRPCBotStoreClient) GetSize(key datastore.Key) (int, error)
- func (m *GRPCBotStoreClient) Has(key datastore.Key) (bool, error)
- func (m *GRPCBotStoreClient) Put(key datastore.Key, value []byte) error
- type GRPCBotStoreServer
- func (m *GRPCBotStoreServer) Close(ctx context.Context, req *proto.Empty) (resp *proto.Empty, err error)
- func (m *GRPCBotStoreServer) Delete(ctx context.Context, req *proto.DatastoreKey) (resp *proto.Empty, err error)
- func (m *GRPCBotStoreServer) Get(ctx context.Context, req *proto.DatastoreKey) (resp *proto.KeyValResponse, err error)
- func (m *GRPCBotStoreServer) GetSize(ctx context.Context, req *proto.DatastoreKey) (resp *proto.DatastoreSize, err error)
- func (m *GRPCBotStoreServer) Has(ctx context.Context, req *proto.DatastoreKey) (resp *proto.Exists, err error)
- func (m *GRPCBotStoreServer) Put(ctx context.Context, req *proto.DatastoreKeyValue) (resp *proto.Empty, err error)
- type GRPCClient
- func (m *GRPCClient) Delete(q []byte, config shared.ClientConfig) (shared.Response, error)
- func (m *GRPCClient) Get(q []byte, config shared.ClientConfig) (shared.Response, error)
- func (m *GRPCClient) Post(q []byte, b []byte, config shared.ClientConfig) (shared.Response, error)
- func (m *GRPCClient) Put(q []byte, b []byte, config shared.ClientConfig) (shared.Response, error)
- type GRPCIpfsHandlerClient
- type GRPCIpfsHandlerServer
- type GRPCServer
- func (m *GRPCServer) Delete(ctx context.Context, req *proto.APIRequest) (*proto.BotResponse, error)
- func (m *GRPCServer) Get(ctx context.Context, req *proto.APIRequest) (*proto.BotResponse, error)
- func (m *GRPCServer) Post(ctx context.Context, req *proto.APIRequestB) (*proto.BotResponse, error)
- func (m *GRPCServer) Put(ctx context.Context, req *proto.APIRequestB) (*proto.BotResponse, error)
- type TextileBot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
BotID string
Name string
Service shared.Service
// contains filtered or unexported fields
}
type GRPCBotStoreClient ¶
type GRPCBotStoreClient struct {
// contains filtered or unexported fields
}
func (*GRPCBotStoreClient) Close ¶
func (m *GRPCBotStoreClient) Close() error
func (*GRPCBotStoreClient) Get ¶
func (m *GRPCBotStoreClient) Get(key datastore.Key) ([]byte, error)
BotStore Client
type GRPCBotStoreServer ¶
type GRPCBotStoreServer struct {
// This is the real implementation
Impl shared.DatastoreWithoutQuery
}
Here is the gRPC server that GRPCClient talks to.
func (*GRPCBotStoreServer) Delete ¶
func (m *GRPCBotStoreServer) Delete(ctx context.Context, req *proto.DatastoreKey) (resp *proto.Empty, err error)
func (*GRPCBotStoreServer) Get ¶
func (m *GRPCBotStoreServer) Get(ctx context.Context, req *proto.DatastoreKey) (resp *proto.KeyValResponse, err error)
BotStore Server
func (*GRPCBotStoreServer) GetSize ¶
func (m *GRPCBotStoreServer) GetSize(ctx context.Context, req *proto.DatastoreKey) (resp *proto.DatastoreSize, err error)
func (*GRPCBotStoreServer) Has ¶
func (m *GRPCBotStoreServer) Has(ctx context.Context, req *proto.DatastoreKey) (resp *proto.Exists, err error)
func (*GRPCBotStoreServer) Put ¶
func (m *GRPCBotStoreServer) Put(ctx context.Context, req *proto.DatastoreKeyValue) (resp *proto.Empty, err error)
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of KV that talks over RPC.
func (*GRPCClient) Delete ¶
func (m *GRPCClient) Delete(q []byte, config shared.ClientConfig) (shared.Response, error)
func (*GRPCClient) Get ¶
func (m *GRPCClient) Get(q []byte, config shared.ClientConfig) (shared.Response, error)
func (*GRPCClient) Post ¶
func (m *GRPCClient) Post(q []byte, b []byte, config shared.ClientConfig) (shared.Response, error)
func (*GRPCClient) Put ¶
func (m *GRPCClient) Put(q []byte, b []byte, config shared.ClientConfig) (shared.Response, error)
type GRPCIpfsHandlerClient ¶
type GRPCIpfsHandlerClient struct {
// contains filtered or unexported fields
}
type GRPCIpfsHandlerServer ¶
type GRPCServer ¶
type GRPCServer struct {
// This is the real implementation
Impl shared.Service
// contains filtered or unexported fields
}
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) Delete ¶
func (m *GRPCServer) Delete(ctx context.Context, req *proto.APIRequest) (*proto.BotResponse, error)
func (*GRPCServer) Get ¶
func (m *GRPCServer) Get(ctx context.Context, req *proto.APIRequest) (*proto.BotResponse, error)
func (*GRPCServer) Post ¶
func (m *GRPCServer) Post(ctx context.Context, req *proto.APIRequestB) (*proto.BotResponse, error)
func (*GRPCServer) Put ¶
func (m *GRPCServer) Put(ctx context.Context, req *proto.APIRequestB) (*proto.BotResponse, error)
type TextileBot ¶
type TextileBot struct {
plugin.NetRPCUnsupportedPlugin
// Concrete implementation, written in Go. This is only used for plugins
// that are written in Go.
Impl shared.Service
}
This is the implementation of plugin.Plugin so we can serve/consume this. We also implement GRPCPlugin so that this plugin can be served over gRPC.
func (*TextileBot) GRPCClient ¶
func (p *TextileBot) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*TextileBot) GRPCServer ¶
func (p *TextileBot) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.