Documentation
¶
Index ¶
- Variables
- type LogType
- type Logger
- type LoggerGRPCClient
- func (c LoggerGRPCClient) Message(message string, fields map[string]string) error
- func (c LoggerGRPCClient) PluginError(message string, fields map[string]string) error
- func (c LoggerGRPCClient) Success(message string, fields map[string]string) error
- func (c LoggerGRPCClient) UserError(message string, fields map[string]string) error
- func (c LoggerGRPCClient) UserFatal(message string, fields map[string]string) error
- func (c LoggerGRPCClient) Warn(message string, fields map[string]string) error
- type LoggerGRPCServer
- func (s *LoggerGRPCServer) Message(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- func (s *LoggerGRPCServer) PluginError(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- func (s *LoggerGRPCServer) Success(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- func (s *LoggerGRPCServer) UserError(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- func (s *LoggerGRPCServer) UserFatal(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- func (s *LoggerGRPCServer) Warn(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
- type PingCliCommand
- type PingCliCommandConfiguration
- type PingCliCommandGRPCClient
- type PingCliCommandGRPCServer
- type PingCliCommandGrpcPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HandshakeConfig = plugin.HandshakeConfig{ ProtocolVersion: 1, MagicCookieKey: "PINGCLI_COMMAND_PLUGIN_KEY", MagicCookieValue: "8b8a9351-bef8-42fc-a642-7cb10f12a49c", } ENUM_PINGCLI_COMMAND_GRPC string = "pingcli_command_grpc" PluginMap = map[string]plugin.Plugin{ ENUM_PINGCLI_COMMAND_GRPC: &PingCliCommandGrpcPlugin{}, } )
View Source
var (
ErrNilConfiguration = errors.New("plugin returned a nil configuration")
)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Message(message string, fields map[string]string) error
Success(message string, fields map[string]string) error
Warn(message string, fields map[string]string) error
UserError(message string, fields map[string]string) error
UserFatal(message string, fields map[string]string) error
PluginError(message string, fields map[string]string) error
}
type LoggerGRPCClient ¶
type LoggerGRPCClient struct {
// contains filtered or unexported fields
}
func (LoggerGRPCClient) Message ¶
func (c LoggerGRPCClient) Message(message string, fields map[string]string) error
func (LoggerGRPCClient) PluginError ¶
func (c LoggerGRPCClient) PluginError(message string, fields map[string]string) error
func (LoggerGRPCClient) Success ¶
func (c LoggerGRPCClient) Success(message string, fields map[string]string) error
func (LoggerGRPCClient) UserError ¶
func (c LoggerGRPCClient) UserError(message string, fields map[string]string) error
type LoggerGRPCServer ¶
type LoggerGRPCServer struct {
Impl Logger
proto.UnimplementedLoggerServer
}
func (*LoggerGRPCServer) Message ¶
func (s *LoggerGRPCServer) Message(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
func (*LoggerGRPCServer) PluginError ¶
func (s *LoggerGRPCServer) PluginError(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
func (*LoggerGRPCServer) Success ¶
func (s *LoggerGRPCServer) Success(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
func (*LoggerGRPCServer) UserError ¶
func (s *LoggerGRPCServer) UserError(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
func (*LoggerGRPCServer) UserFatal ¶
func (s *LoggerGRPCServer) UserFatal(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
func (*LoggerGRPCServer) Warn ¶
func (s *LoggerGRPCServer) Warn(ctx context.Context, req *proto.LoggerRequest) (*proto.Empty, error)
type PingCliCommand ¶
type PingCliCommand interface {
Configuration() (*PingCliCommandConfiguration, error)
Run(args []string, l Logger) error
}
type PingCliCommandGRPCClient ¶
type PingCliCommandGRPCClient struct {
// contains filtered or unexported fields
}
func (*PingCliCommandGRPCClient) Configuration ¶
func (c *PingCliCommandGRPCClient) Configuration() (*PingCliCommandConfiguration, error)
type PingCliCommandGRPCServer ¶
type PingCliCommandGRPCServer struct {
Impl PingCliCommand
proto.UnimplementedPingCliCommandServer
// contains filtered or unexported fields
}
func (*PingCliCommandGRPCServer) Configuration ¶
func (s *PingCliCommandGRPCServer) Configuration(ctx context.Context, req *proto.Empty) (*proto.PingCliCommandConfigurationResponse, error)
func (*PingCliCommandGRPCServer) Run ¶
func (s *PingCliCommandGRPCServer) Run(ctx context.Context, req *proto.PingCliCommandRunRequest) (em *proto.Empty, err error)
type PingCliCommandGrpcPlugin ¶
type PingCliCommandGrpcPlugin struct {
plugin.Plugin
Impl PingCliCommand
}
func (*PingCliCommandGrpcPlugin) GRPCClient ¶
func (p *PingCliCommandGrpcPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (any, error)
func (*PingCliCommandGrpcPlugin) GRPCServer ¶
func (p *PingCliCommandGrpcPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.