Documentation
¶
Index ¶
- Variables
- func Serve(impl DrainPlugin)
- type DrainClient
- func (c DrainClient) Init(ctx context.Context, logger hclog.Logger, settings DrainPluginSettings) (DrainPluginInfo, error)
- func (c DrainClient) IsDrainOk(ctx context.Context, nodeName string) (bool, error)
- func (c DrainClient) IsHealthy(ctx context.Context) (bool, error)
- func (c DrainClient) IsSupported(ctx context.Context) (bool, error)
- func (c DrainClient) PostDrain(ctx context.Context, nodeName string) error
- func (c DrainClient) PreDrain(ctx context.Context, nodeName string) error
- type DrainPlugin
- type DrainPluginInfo
- type DrainPluginSettings
- type DrainServer
- func (s DrainServer) Init(ctx context.Context, request *proto.InitRequest) (*proto.InitResponse, error)
- func (s DrainServer) IsDrainOk(ctx context.Context, request *proto.IsDrainOkRequest) (*proto.IsDrainOkResponse, error)
- func (s DrainServer) IsHealthy(ctx context.Context, request *proto.IsHealthyRequest) (*proto.IsHealthyResponse, error)
- func (s DrainServer) IsSupported(ctx context.Context, request *proto.IsSupportedRequest) (*proto.IsSupportedResponse, error)
- func (s DrainServer) PostDrain(ctx context.Context, request *proto.PostDrainRequest) (*proto.PostDrainResponse, error)
- func (s DrainServer) PreDrain(ctx context.Context, request *proto.PreDrainRequest) (*proto.PreDrainResponse, error)
- type GRPCDrainPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
MagicCookieKey: "NODEDRAIN_PLUGIN",
MagicCookieValue: "4ae46e30-c5de-4ab9-a2c5-4618fdcab7ae",
}
Functions ¶
func Serve ¶
func Serve(impl DrainPlugin)
Types ¶
type DrainClient ¶
type DrainClient struct {
// contains filtered or unexported fields
}
func (DrainClient) Init ¶
func (c DrainClient) Init(ctx context.Context, logger hclog.Logger, settings DrainPluginSettings) (DrainPluginInfo, error)
func (DrainClient) IsSupported ¶
func (c DrainClient) IsSupported(ctx context.Context) (bool, error)
type DrainPlugin ¶
type DrainPlugin interface {
Init(ctx context.Context, logger hclog.Logger, settings DrainPluginSettings) (DrainPluginInfo, error)
IsSupported(ctx context.Context) (bool, error)
IsHealthy(ctx context.Context) (bool, error)
IsDrainOk(ctx context.Context, nodeName string) (bool, error)
PreDrain(ctx context.Context, nodeName string) error
PostDrain(ctx context.Context, nodeName string) error
}
type DrainPluginInfo ¶
type DrainPluginInfo struct {
ID string
}
type DrainPluginSettings ¶
type DrainPluginSettings struct {
}
type DrainServer ¶
type DrainServer struct {
Logger hclog.Logger
Impl DrainPlugin
}
func (DrainServer) Init ¶
func (s DrainServer) Init(ctx context.Context, request *proto.InitRequest) (*proto.InitResponse, error)
func (DrainServer) IsDrainOk ¶
func (s DrainServer) IsDrainOk(ctx context.Context, request *proto.IsDrainOkRequest) (*proto.IsDrainOkResponse, error)
func (DrainServer) IsHealthy ¶
func (s DrainServer) IsHealthy(ctx context.Context, request *proto.IsHealthyRequest) (*proto.IsHealthyResponse, error)
func (DrainServer) IsSupported ¶
func (s DrainServer) IsSupported(ctx context.Context, request *proto.IsSupportedRequest) (*proto.IsSupportedResponse, error)
func (DrainServer) PostDrain ¶
func (s DrainServer) PostDrain(ctx context.Context, request *proto.PostDrainRequest) (*proto.PostDrainResponse, error)
func (DrainServer) PreDrain ¶
func (s DrainServer) PreDrain(ctx context.Context, request *proto.PreDrainRequest) (*proto.PreDrainResponse, error)
type GRPCDrainPlugin ¶
type GRPCDrainPlugin struct {
plugin.NetRPCUnsupportedPlugin
Logger hclog.Logger
Impl DrainPlugin
}
func (GRPCDrainPlugin) GRPCClient ¶
func (p GRPCDrainPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (GRPCDrainPlugin) GRPCServer ¶
func (p GRPCDrainPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.