grpc

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 LogType

type LogType int32
const (
	LOG_TYPE_UNSPECIFIED LogType = 0
	LOG_TYPE_DEBUG       LogType = 1
)

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

func (LoggerGRPCClient) UserFatal

func (c LoggerGRPCClient) UserFatal(message string, fields map[string]string) error

func (LoggerGRPCClient) Warn

func (c LoggerGRPCClient) Warn(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

type PingCliCommand

type PingCliCommand interface {
	Configuration() (*PingCliCommandConfiguration, error)
	Run(args []string, l Logger) error
}

type PingCliCommandConfiguration

type PingCliCommandConfiguration struct {
	Example string
	Long    string
	Short   string
	Use     string
}

type PingCliCommandGRPCClient

type PingCliCommandGRPCClient struct {
	// contains filtered or unexported fields
}

func (*PingCliCommandGRPCClient) Configuration

func (*PingCliCommandGRPCClient) Run

func (c *PingCliCommandGRPCClient) Run(args []string, l Logger) error

type PingCliCommandGRPCServer

type PingCliCommandGRPCServer struct {
	Impl PingCliCommand

	proto.UnimplementedPingCliCommandServer
	// contains filtered or unexported fields
}

func (*PingCliCommandGRPCServer) Configuration

func (*PingCliCommandGRPCServer) Run

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL