netrpc

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: 5 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 that talks over RPC.

func (*Client) Decrypt

func (c *Client) Decrypt(req *model.DecryptRequest) (*model.DecryptResponse, error)

Decrypt ...

type Plugin

type Plugin struct {
	// Concrete implementation, written in Go. This is only used for plugins
	// that are written in Go.
	Impl shared.DecryptorInterface
}

Decrypt - this is the interface that we're exposing as a plugin. Plugin - This is the implementation of plugin.Plugin so we can serve/consume this.

func (*Plugin) Client

func (p *Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

GRPCClient - Required method to implement Plugin interface

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

Server - Required method to implement Plugin interface

type Server

type Server struct {
	Impl shared.DecryptorInterface
}

Server - This is the RPC server that Client talks to, conforming to the requirements of net/rpc

func (*Server) Decrypt

func (s *Server) Decrypt(_req *model.DecryptRequest, _resp *model.DecryptResponse) error

Decrypt ...

Jump to

Keyboard shortcuts

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