mock

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mock implements some mock objects.

Index

Constants

View Source
const (
	// Category is the category of MockNamespacer.
	Category = supervisor.CategoryBusinessController
	// Kind is the kind of MockNamespacer
	Kind = "MockNamespacer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNamespacer

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

MockNamespacer create a mock namespace for test

func (*MockNamespacer) Category

func (mn *MockNamespacer) Category() supervisor.ObjectCategory

Category returns the category of MockNamespacer.

func (*MockNamespacer) Close

func (mn *MockNamespacer) Close()

Close closes MockNamespacer.

func (*MockNamespacer) DefaultSpec

func (mn *MockNamespacer) DefaultSpec() interface{}

DefaultSpec returns the default spec of MockNamespacer.

func (*MockNamespacer) Inherit

func (mn *MockNamespacer) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)

Inherit inherits previous generation of MockNamespacer.

func (*MockNamespacer) Init

func (mn *MockNamespacer) Init(superSpec *supervisor.Spec)

Init initializes MockNamespacer.

func (*MockNamespacer) Kind

func (mn *MockNamespacer) Kind() string

Kind returns the kind of MockNamespacer.

func (*MockNamespacer) Status

func (mn *MockNamespacer) Status() *supervisor.Status

Status returns the status of MockNamespacer.

type NamedHTTPServer

type NamedHTTPServer struct {
	Kind            string `json:"kind"`
	Name            string `json:"name"`
	httpserver.Spec `json:",inline"`
}

type NamedPipeline

type NamedPipeline struct {
	Kind          string `json:"kind"`
	Name          string `json:"name"`
	pipeline.Spec `json:",inline"`
}

type Spec

type Spec struct {
	Namespace   string            `json:"namespace"`
	HTTPServers []NamedHTTPServer `json:"httpServers"`
	Pipelines   []NamedPipeline   `json:"pipelines"`
}

Spec is the MockNamespacer spec

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate validates the MockNamespacer Spec.

Jump to

Keyboard shortcuts

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