Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
View Source
var PluginMap = map[string]plugin.Plugin{ "counter": &CounterPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type AddGRPCClient ¶
type AddGRPCClient struct {
// contains filtered or unexported fields
}
type AddGRPCServer ¶
type AddGRPCServer struct {
Impl Add
}
func (*AddGRPCServer) Sum ¶
func (a *AddGRPCServer) Sum(c context.Context, request *proto.SumRequest) (*proto.SumResponse, error)
type CounterGRPCClient ¶
type CounterGRPCClient struct {
// contains filtered or unexported fields
}
type CounterGRPCServer ¶
type CounterGRPCServer struct {
Impl Counter
// contains filtered or unexported fields
}
func (*CounterGRPCServer) Get ¶
func (c *CounterGRPCServer) Get(ctx context.Context, request *proto.GetRequest) (*proto.GetResponse, error)
func (*CounterGRPCServer) Put ¶
func (c *CounterGRPCServer) Put(ctx context.Context, request *proto.PutRequest) (*proto.Empty, error)
type CounterPlugin ¶
type CounterPlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl Counter
}
func (*CounterPlugin) GRPCClient ¶
func (c *CounterPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, client *grpc.ClientConn) (interface{}, error)
func (*CounterPlugin) GRPCServer ¶
func (c *CounterPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.