Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "SKENARIO_PLUGIN",
MagicCookieValue: "skplug",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ "autoscaler": &AutoscalerPlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type Autoscaler ¶
type Autoscaler proto.Autoscaler
type AutoscalerPlugin ¶
type AutoscalerPlugin struct { plugin.NetRPCUnsupportedPlugin // Concrete implementation, written in Go. This is only used for plugins // that are written in Go. Impl Plugin }
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 (*AutoscalerPlugin) GRPCClient ¶
func (p *AutoscalerPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*AutoscalerPlugin) GRPCServer ¶
func (p *AutoscalerPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of Plugin that talks over RPC.
type GRPCServer ¶
type GRPCServer struct { // This is the real implementation Impl Plugin // contains filtered or unexported fields }
GRPCServer is the gRPC server that the GRPCClient talks to.
func (*GRPCServer) Event ¶
func (m *GRPCServer) Event(ctx context.Context, req *proto.EventRequest) (*proto.Empty, error)
func (*GRPCServer) Scale ¶
func (m *GRPCServer) Scale(ctx context.Context, req *proto.ScaleRequest) (*proto.ScaleResponse, error)
func (*GRPCServer) Stat ¶
func (m *GRPCServer) Stat(ctx context.Context, req *proto.StatRequest) (*proto.Empty, error)
Click to show internal directories.
Click to hide internal directories.