fakeapi

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeApi

type FakeApi struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *FakeApi

func (*FakeApi) AddAnnotation

func (f *FakeApi) AddAnnotation()

AddAnnotation allows test annotation endpoint.

func (*FakeApi) Append

func (f *FakeApi) Append(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*FakeApi) AppendConsulV1CatalogNode

func (f *FakeApi) AppendConsulV1CatalogNode(name string, node api.CatalogNode)

AppendConsulV1CatalogNode adds "/v1/catalog/node/<name>" route to API.

func (*FakeApi) AppendConsulV1CatalogRegister

func (f *FakeApi) AppendConsulV1CatalogRegister()

func (*FakeApi) AppendConsulV1CatalogService

func (f *FakeApi) AppendConsulV1CatalogService()

func (*FakeApi) AppendConsulV1KV

func (f *FakeApi) AppendConsulV1KV()

func (*FakeApi) AppendConsulV1StatusLeader

func (f *FakeApi) AppendConsulV1StatusLeader()

AppendConsulV1StatusLeader adds "/v1/status/leader" route to API.

func (*FakeApi) AppendManaged

func (f *FakeApi) AppendManaged()

func (*FakeApi) AppendPrometheusAPIV1Query

func (f *FakeApi) AppendPrometheusAPIV1Query()

func (*FakeApi) AppendQanAPIAgents

func (f *FakeApi) AppendQanAPIAgents(id string)

func (*FakeApi) AppendQanAPIInstances

func (f *FakeApi) AppendQanAPIInstances(protoInstances []*proto.Instance)

func (*FakeApi) AppendQanAPIInstancesId

func (f *FakeApi) AppendQanAPIInstancesId(id string, protoInstance *proto.Instance)

func (*FakeApi) AppendQanAPIPing

func (f *FakeApi) AppendQanAPIPing()

AppendQanAPIPing adds "/qan-api/ping" route to API.

func (*FakeApi) AppendRoot

func (f *FakeApi) AppendRoot()

AppendRoot adds "/" route to API.

func (*FakeApi) Close

func (f *FakeApi) Close()

Close shutdowns FakeApi server.

func (*FakeApi) Start

func (f *FakeApi) Start() (string, string, string)

Start new FakeApi server and return it's URL, host and port

Jump to

Keyboard shortcuts

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