rpc

package
v1.8.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 11 Imported by: 0 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 ChangeVppSvc

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

ChangeVppSvc forwards GRPC request to the localclient.

func (*ChangeVppSvc) Del

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

Del removes configuration data present in data request from the VPP/linux

func (*ChangeVppSvc) Put

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

Put adds configuration data present in data request to the VPP/Linux

type Deps added in v1.8.1

type Deps struct {
	infra.PluginDeps
	GRPCServer grpc.Server
}

Deps - dependencies of Plugin

type GRPCService

type GRPCService interface {

	// updateNotification stores VPP notifications/statistic data. The notification can be read by any client
	// connected to the notification service server
	// todo make type independent
	UpdateNotifications(ctx context.Context, notification *interfaces.InterfaceNotification)
}

GRPCService allows to send VPP notifications to external GRPC endpoints

type NotificationSvc

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

NotificationSvc forwards GRPC messages to external servers.

func (*NotificationSvc) Get

Get returns all required VPP notifications (or those available in the buffer) in the same order as they were received

type Option added in v1.8.1

type Option func(*Plugin)

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

func UseDeps added in v1.8.1

func UseDeps(cb func(*Deps)) Option

UseDeps returns Option that can inject custom dependencies.

type Plugin added in v1.8.1

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

Plugin registers VPP GRPC services in *grpc.Server.

func NewPlugin added in v1.8.1

func NewPlugin(opts ...Option) *Plugin

NewPlugin creates a new Plugin with the provides Options

func (*Plugin) Close added in v1.8.1

func (plugin *Plugin) Close() error

Close does nothing.

func (*Plugin) Init added in v1.8.1

func (plugin *Plugin) Init() error

Init sets plugin child loggers for changeVppSvc & resyncVppSvc.

func (*Plugin) UpdateNotifications

func (plugin *Plugin) UpdateNotifications(ctx context.Context, notification *interfaces.InterfaceNotification)

UpdateNotifications stores new notification data

type ResyncVppSvc

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

ResyncVppSvc forwards GRPC request to the localclient.

func (*ResyncVppSvc) Resync

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

Resync creates a resync request which adds data tp the VPP/linux

Jump to

Keyboard shortcuts

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