mock

package
v0.0.0-...-5cef3e7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ShimStderrOutput = "Some output on stderr"

ShimStderrOutput is the expected output sent by the mock shim on stderr.

View Source
const ShimStdoutOutput = "Some output on stdout"

ShimStdoutOutput is the expected output sent by the mock shim on stdout.

Variables

View Source
var DefaultMockHookBinPath string

DefaultMockHookBinPath is populated at link time.

View Source
var DefaultMockKataShimBinPath string

DefaultMockKataShimBinPath is populated at link time.

Functions

func StartShim

func StartShim(config ShimMockConfig) error

StartShim is a common routine for starting a shim mock.

Types

type ProxyGRPCMock

type ProxyGRPCMock struct {
	// GRPCImplementer is the structure implementing
	// the GRPC interface we want the proxy to serve.
	GRPCImplementer interface{}

	// GRPCRegister is the registration routine for
	// the GRPC service.
	GRPCRegister func(s *grpc.Server, srv interface{})
	// contains filtered or unexported fields
}

ProxyGRPCMock is the gRPC proxy mock

func (*ProxyGRPCMock) Start

func (p *ProxyGRPCMock) Start(URL string) error

Start starts the gRPC proxy mock

func (*ProxyGRPCMock) Stop

func (p *ProxyGRPCMock) Stop() error

Stop stops the gRPC proxy mock

type ProxyMock

type ProxyMock interface {
	Start(URL string) error
	Stop() error
}

ProxyMock is the proxy mock interface. It allows for implementing different kind of containers proxies front end.

type ProxyUnixMock

type ProxyUnixMock struct {
	ClientHandler func(c net.Conn)
	// contains filtered or unexported fields
}

ProxyUnixMock is the UNIX proxy mock

func (*ProxyUnixMock) Start

func (p *ProxyUnixMock) Start(URL string) error

Start starts the UNIX proxy mock

func (*ProxyUnixMock) Stop

func (p *ProxyUnixMock) Stop() error

Stop stops the UNIX proxy mock

type ShimMockConfig

type ShimMockConfig struct {
	Name               string
	URLParamName       string
	ContainerParamName string
	TokenParamName     string
}

ShimMockConfig is the configuration structure for all virtcontainers shim mock implementations.

Jump to

Keyboard shortcuts

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