netrpc

package
v0.0.0-...-ac99608 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

Overview

Code generated by protoc-gen-hcplugin. DO NOT EDIT.

Code generated by protoc-gen-hcplugin. DO NOT EDIT.

Code generated by protoc-gen-hcplugin. DO NOT EDIT.

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) Get

func (c *Client) Get(key string) ([]byte, error)

func (*Client) Put

func (c *Client) Put(key string, value []byte) error

type Plugin

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

KV - 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.KVInterface
}

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

func (*Server) Get

func (s *Server) Get(_req *base.GetRequest, _resp *base.GetResponse) error

func (*Server) Put

func (s *Server) Put(_req *base.PutRequest, _resp *base.Empty) error

Jump to

Keyboard shortcuts

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