zapPlugin

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCClient

type GRPCClient struct {
	Client zapProto.ZapClient
}

GRPCClient is an implementation of ZapInterface that talks over RPC.

func (*GRPCClient) Get

func (m *GRPCClient) Get(key string) ([]byte, error)

func (*GRPCClient) Put

func (m *GRPCClient) Put(key string, value []byte) error

type GRPCServer

type GRPCServer struct {
	zapProto.UnimplementedZapServer
	Impl zapService.ZapInterface
}

func (*GRPCServer) Get

func (*GRPCServer) Put

type ZapPlugin

type ZapPlugin struct {
	// GRPCPlugin must still implement the Plugin interface
	plugin.Plugin

	// Concrete implementation, written in Go. This is only used for plugins that are written in Go.
	Impl zapService.ZapInterface
}

This is the implementation of plugin.GRPCPlugin so we can serve/consume this.

func (*ZapPlugin) GRPCClient

func (p *ZapPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*ZapPlugin) GRPCServer

func (p *ZapPlugin) 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