rpc

package
Version: v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is default instance of Plugin

Functions

This section is empty.

Types

type ChangeSvc

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

ChangeSvc implements DataChangeService.

func (*ChangeSvc) Del

func (svc *ChangeSvc) Del(ctx context.Context, data *rpc.DataRequest) (*rpc.DelResponse, error)

Del propagates request from GRPC client to remove some external configuration items.

func (*ChangeSvc) Put

func (svc *ChangeSvc) Put(ctx context.Context, data *rpc.DataRequest) (*rpc.PutResponse, error)

Put propagates request from GRPC client to add/modify some external configuration items.

type Deps

type Deps struct {
	infra.PluginDeps
	GRPCServer grpc.Server
	EventLoop  controller.EventLoop
	LocalDB    keyval.KvProtoPlugin
}

Deps - dependencies of Plugin

type Option

type Option func(*Plugin)

Option is a function that acts on a Plugin to inject Dependencies or configuration

func UseDeps

func UseDeps(cb func(*Deps)) Option

UseDeps returns Option that can inject custom dependencies.

type Plugin

type Plugin struct {
	Deps
	// contains filtered or unexported fields
}

Plugin implements GRPC access to Contiv's VPP-agent.

func NewPlugin

func NewPlugin(opts ...Option) *Plugin

NewPlugin creates a new Plugin with the provides Options

func (*Plugin) Close

func (p *Plugin) Close() error

Close does nothing.

func (*Plugin) GetConfigSnapshot

func (p *Plugin) GetConfigSnapshot() (controller.KeyValuePairs, error)

GetConfigSnapshot returns full configuration snapshot that is currently required by the GRPC client to be applied.

func (*Plugin) Init

func (p *Plugin) Init() error

Init registers GRPC services.

type ResyncSvc

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

ResyncSvc implements DataResyncService.

func (*ResyncSvc) Resync

func (svc *ResyncSvc) Resync(ctx context.Context, data *rpc.DataRequest) (*rpc.ResyncResponse, error)

Resync re-synchronizes configuration between the GRPC client and vpp-agent.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL