grpc

package
v0.0.0-...-17f76c2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an implementation of shared.Encrypt that talks over gRPC.

func (*Client) Encrypt

func (c *Client) Encrypt(req *model.EncryptRequest) (*model.EncryptResponse, error)

Encrypt ...

type Plugin

type Plugin struct {
	// Plugin 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 shared.EncryptorInterface
}

GRPCClient is an implementation of shared that talks over gRPC.

func (*Plugin) GRPCClient

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

GRPCClient - Required method to implement Plugin interface

func (*Plugin) GRPCServer

func (p *Plugin) GRPCServer(broker *plugin.GRPCBroker, s *grpcx.Server) error

GRPCServer - Required method to implement Plugin interface

type Server

type Server struct {
	Impl shared.EncryptorInterface
}

Server - Here is the gRPC server that Client talks to.

func (*Server) Encrypt

func (s *Server) Encrypt(ctx context.Context, _req *model.EncryptRequest) (*model.EncryptResponse, error)

Encrypt ...

Jump to

Keyboard shortcuts

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