statusstoretest

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeStatusStore

type FakeStatusStore struct {
	Statuses map[StatusIdentifier]statusstore.Status

	// Imitates the ModifyIndex capability of consul, enabling CAS operations
	LastIndex uint64
	// contains filtered or unexported fields
}

Implementation of the statusstore.Store interface that can be used for unit testing

func NewFake

func NewFake() *FakeStatusStore

func (*FakeStatusStore) CASStatus

func (s *FakeStatusStore) CASStatus(
	ctx context.Context,
	t statusstore.ResourceType,
	id statusstore.ResourceID,
	namespace statusstore.Namespace,
	status statusstore.Status,
	modifyIndex uint64,
) error

func (*FakeStatusStore) DeleteStatus

func (*FakeStatusStore) DeleteStatusTxn

func (*FakeStatusStore) GetAllStatusForResource

func (*FakeStatusStore) GetAllStatusForResourceType

func (*FakeStatusStore) GetStatus

func (*FakeStatusStore) SetStatus

func (*FakeStatusStore) SetTxn

func (*FakeStatusStore) WatchStatus

type StatusIdentifier

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

Just a convenient index into the status map that models the interface arguments

func (StatusIdentifier) String

func (s StatusIdentifier) String() string

Jump to

Keyboard shortcuts

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