mock

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoVPPMux

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

GoVPPMux implements GoVPP Mux API with stats

func NewMockGoVPPMux

func NewMockGoVPPMux(ctx *vppcallmock.TestCtx) (*GoVPPMux, error)

NewMockGoVPPMux prepares new mock of GoVPP multiplexor with given context

func (*GoVPPMux) Close

func (p *GoVPPMux) Close()

Close connection

func (*GoVPPMux) DumpStats

func (p *GoVPPMux) DumpStats(patterns ...string) ([]*adapter.StatEntry, error)

DumpStats dumps stats from mocked stats API

func (*GoVPPMux) ListStats

func (p *GoVPPMux) ListStats(patterns ...string) ([]string, error)

ListStats lists stats from mocked stats API

func (*GoVPPMux) MockStats

func (p *GoVPPMux) MockStats(stats []*adapter.StatEntry) error

MockStats allows to set required stats which are then returned by 'ListStats' or 'DumpStats'

func (*GoVPPMux) NewAPIChannel

func (p *GoVPPMux) NewAPIChannel() (govppapi.Channel, error)

NewAPIChannel calls the same method from connection

func (*GoVPPMux) NewAPIChannelBuffered

func (p *GoVPPMux) NewAPIChannelBuffered(reqChanBufSize, replyChanBufSize int) (govppapi.Channel, error)

NewAPIChannelBuffered calls the same method from connection

Jump to

Keyboard shortcuts

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