mocks

package
v0.0.0-...-b022d11 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTemplate

func FromTemplate() runtime.Runtime

FromTemplate returns a mock runtime instance created from template

Types

type Nerv

type Nerv struct {
	Runtime
	sync.Mutex
	// contains filtered or unexported fields
}

Nerv a fake runtime

func (*Nerv) SetDaemonRunning

func (n *Nerv) SetDaemonRunning(status bool)

SetDaemonRunning set `daemonRunning`

func (*Nerv) StartCustomEvent

func (n *Nerv) StartCustomEvent(event *types.WorkloadEventMessage)

StartCustomEvent .

func (*Nerv) StartEvents

func (n *Nerv) StartEvents()

StartEvents starts the events: Shinji 400%, Asuka starts, Asuka dies, Rei dies

type Runtime

type Runtime struct {
	mock.Mock
}

Runtime is an autogenerated mock type for the Runtime type

func NewRuntime

func NewRuntime(t mockConstructorTestingTNewRuntime) *Runtime

NewRuntime creates a new instance of Runtime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Runtime) AttachWorkload

func (_m *Runtime) AttachWorkload(ctx context.Context, ID string) (io.Reader, io.Reader, error)

AttachWorkload provides a mock function with given fields: ctx, ID

func (*Runtime) CollectWorkloadMetrics

func (_m *Runtime) CollectWorkloadMetrics(ctx context.Context, ID string)

CollectWorkloadMetrics provides a mock function with given fields: ctx, ID

func (*Runtime) Events

func (_m *Runtime) Events(ctx context.Context, filters map[string]string) (<-chan *types.WorkloadEventMessage, <-chan error)

Events provides a mock function with given fields: ctx, filters

func (*Runtime) GetStatus

func (_m *Runtime) GetStatus(ctx context.Context, ID string, checkHealth bool) (*types.WorkloadStatus, error)

GetStatus provides a mock function with given fields: ctx, ID, checkHealth

func (*Runtime) GetWorkloadName

func (_m *Runtime) GetWorkloadName(ctx context.Context, ID string) (string, error)

GetWorkloadName provides a mock function with given fields: ctx, ID

func (*Runtime) IsDaemonRunning

func (_m *Runtime) IsDaemonRunning(ctx context.Context) bool

IsDaemonRunning provides a mock function with given fields: ctx

func (*Runtime) ListWorkloadIDs

func (_m *Runtime) ListWorkloadIDs(ctx context.Context, filters map[string]string) ([]string, error)

ListWorkloadIDs provides a mock function with given fields: ctx, filters

func (*Runtime) LogFieldsExtra

func (_m *Runtime) LogFieldsExtra(ctx context.Context, ID string) (map[string]string, error)

LogFieldsExtra provides a mock function with given fields: ctx, ID

func (*Runtime) Name

func (_m *Runtime) Name() string

Name provides a mock function with given fields:

Jump to

Keyboard shortcuts

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