mocks

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVMock

type KVMock[T any] struct {
	tinykv.KV[T]
	mock.Mock
	// contains filtered or unexported fields
}

func NewKVMock

func NewKVMock() *KVMock[instance.State]

func (*KVMock[T]) Add

func (kv *KVMock[T]) Add(count int)

func (*KVMock[T]) Delete

func (kv *KVMock[T]) Delete(k string)

func (*KVMock[T]) Get

func (kv *KVMock[T]) Get(k string) (v instance.State, ok bool)

func (*KVMock[T]) Put

func (kv *KVMock[T]) Put(k string, v T, expiresAfter time.Duration) error

func (*KVMock[T]) Wait

func (kv *KVMock[T]) Wait()

type ProviderMock

type ProviderMock struct {
	providers.Provider
	mock.Mock
	// contains filtered or unexported fields
}

func NewProviderMock

func NewProviderMock() *ProviderMock

func NewProviderMockWithStoppedInstancesEvents

func NewProviderMockWithStoppedInstancesEvents(stoppedInstances []string) *ProviderMock

func (*ProviderMock) Add

func (provider *ProviderMock) Add(count int)

func (*ProviderMock) GetGroups

func (provider *ProviderMock) GetGroups(ctx context.Context) (map[string][]string, error)

func (*ProviderMock) GetState

func (provider *ProviderMock) GetState(ctx context.Context, name string) (instance.State, error)

func (*ProviderMock) NotifyInstanceStopped

func (provider *ProviderMock) NotifyInstanceStopped(ctx context.Context, instance chan<- string)

func (*ProviderMock) Wait

func (provider *ProviderMock) Wait()

Jump to

Keyboard shortcuts

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