rpc

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.ExternalConfig, 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.

Source Files

  • grpc_plugin.go
  • options.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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