fakes

package
v0.0.0-...-ea612b3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeClient

func NewFakeClient() (*FakeClient, *FakeClientComponents)

Types

type FakeAgent

type FakeAgent struct {
	ChecksStub func() (map[string]*api.AgentCheck, error)

	ServicesStub func() (map[string]*api.AgentService, error)

	ServiceRegisterStub func(service *api.AgentServiceRegistration) error

	ServiceDeregisterStub func(serviceID string) error

	PassTTLStub func(checkID, note string) error

	WarnTTLStub func(checkID, note string) error

	FailTTLStub func(checkID, note string) error

	NodeNameStub func() (string, error)

	CheckDeregisterStub func(checkID string) error
	// contains filtered or unexported fields
}

func (*FakeAgent) CheckDeregister

func (fake *FakeAgent) CheckDeregister(checkID string) error

func (*FakeAgent) CheckDeregisterArgsForCall

func (fake *FakeAgent) CheckDeregisterArgsForCall(i int) string

func (*FakeAgent) CheckDeregisterCallCount

func (fake *FakeAgent) CheckDeregisterCallCount() int

func (*FakeAgent) CheckDeregisterReturns

func (fake *FakeAgent) CheckDeregisterReturns(result1 error)

func (*FakeAgent) Checks

func (fake *FakeAgent) Checks() (map[string]*api.AgentCheck, error)

func (*FakeAgent) ChecksCallCount

func (fake *FakeAgent) ChecksCallCount() int

func (*FakeAgent) ChecksReturns

func (fake *FakeAgent) ChecksReturns(result1 map[string]*api.AgentCheck, result2 error)

func (*FakeAgent) FailTTL

func (fake *FakeAgent) FailTTL(checkID string, note string) error

func (*FakeAgent) FailTTLArgsForCall

func (fake *FakeAgent) FailTTLArgsForCall(i int) (string, string)

func (*FakeAgent) FailTTLCallCount

func (fake *FakeAgent) FailTTLCallCount() int

func (*FakeAgent) FailTTLReturns

func (fake *FakeAgent) FailTTLReturns(result1 error)

func (*FakeAgent) NodeName

func (fake *FakeAgent) NodeName() (string, error)

func (*FakeAgent) NodeNameCallCount

func (fake *FakeAgent) NodeNameCallCount() int

func (*FakeAgent) NodeNameReturns

func (fake *FakeAgent) NodeNameReturns(result1 string, result2 error)

func (*FakeAgent) PassTTL

func (fake *FakeAgent) PassTTL(checkID string, note string) error

func (*FakeAgent) PassTTLArgsForCall

func (fake *FakeAgent) PassTTLArgsForCall(i int) (string, string)

func (*FakeAgent) PassTTLCallCount

func (fake *FakeAgent) PassTTLCallCount() int

func (*FakeAgent) PassTTLReturns

func (fake *FakeAgent) PassTTLReturns(result1 error)

func (*FakeAgent) ServiceDeregister

func (fake *FakeAgent) ServiceDeregister(serviceID string) error

func (*FakeAgent) ServiceDeregisterArgsForCall

func (fake *FakeAgent) ServiceDeregisterArgsForCall(i int) string

func (*FakeAgent) ServiceDeregisterCallCount

func (fake *FakeAgent) ServiceDeregisterCallCount() int

func (*FakeAgent) ServiceDeregisterReturns

func (fake *FakeAgent) ServiceDeregisterReturns(result1 error)

func (*FakeAgent) ServiceRegister

func (fake *FakeAgent) ServiceRegister(service *api.AgentServiceRegistration) error

func (*FakeAgent) ServiceRegisterArgsForCall

func (fake *FakeAgent) ServiceRegisterArgsForCall(i int) *api.AgentServiceRegistration

func (*FakeAgent) ServiceRegisterCallCount

func (fake *FakeAgent) ServiceRegisterCallCount() int

func (*FakeAgent) ServiceRegisterReturns

func (fake *FakeAgent) ServiceRegisterReturns(result1 error)

func (*FakeAgent) Services

func (fake *FakeAgent) Services() (map[string]*api.AgentService, error)

func (*FakeAgent) ServicesCallCount

func (fake *FakeAgent) ServicesCallCount() int

func (*FakeAgent) ServicesReturns

func (fake *FakeAgent) ServicesReturns(result1 map[string]*api.AgentService, result2 error)

func (*FakeAgent) WarnTTL

func (fake *FakeAgent) WarnTTL(checkID string, note string) error

func (*FakeAgent) WarnTTLArgsForCall

func (fake *FakeAgent) WarnTTLArgsForCall(i int) (string, string)

func (*FakeAgent) WarnTTLCallCount

func (fake *FakeAgent) WarnTTLCallCount() int

func (*FakeAgent) WarnTTLReturns

func (fake *FakeAgent) WarnTTLReturns(result1 error)

type FakeCatalog

type FakeCatalog struct {
	NodesStub func(q *api.QueryOptions) ([]*api.Node, *api.QueryMeta, error)
	// contains filtered or unexported fields
}

func (*FakeCatalog) Nodes

func (fake *FakeCatalog) Nodes(q *api.QueryOptions) ([]*api.Node, *api.QueryMeta, error)

func (*FakeCatalog) NodesArgsForCall

func (fake *FakeCatalog) NodesArgsForCall(i int) *api.QueryOptions

func (*FakeCatalog) NodesCallCount

func (fake *FakeCatalog) NodesCallCount() int

func (*FakeCatalog) NodesReturns

func (fake *FakeCatalog) NodesReturns(result1 []*api.Node, result2 *api.QueryMeta, result3 error)

type FakeClient

type FakeClient struct {
	AgentStub func() consuladapter.Agent

	SessionStub func() consuladapter.Session

	CatalogStub func() consuladapter.Catalog

	KVStub func() consuladapter.KV

	StatusStub func() consuladapter.Status

	LockOptsStub func(opts *api.LockOptions) (consuladapter.Lock, error)
	// contains filtered or unexported fields
}

func (*FakeClient) Agent

func (fake *FakeClient) Agent() consuladapter.Agent

func (*FakeClient) AgentCallCount

func (fake *FakeClient) AgentCallCount() int

func (*FakeClient) AgentReturns

func (fake *FakeClient) AgentReturns(result1 consuladapter.Agent)

func (*FakeClient) Catalog

func (fake *FakeClient) Catalog() consuladapter.Catalog

func (*FakeClient) CatalogCallCount

func (fake *FakeClient) CatalogCallCount() int

func (*FakeClient) CatalogReturns

func (fake *FakeClient) CatalogReturns(result1 consuladapter.Catalog)

func (*FakeClient) KV

func (fake *FakeClient) KV() consuladapter.KV

func (*FakeClient) KVCallCount

func (fake *FakeClient) KVCallCount() int

func (*FakeClient) KVReturns

func (fake *FakeClient) KVReturns(result1 consuladapter.KV)

func (*FakeClient) LockOpts

func (fake *FakeClient) LockOpts(opts *api.LockOptions) (consuladapter.Lock, error)

func (*FakeClient) LockOptsArgsForCall

func (fake *FakeClient) LockOptsArgsForCall(i int) *api.LockOptions

func (*FakeClient) LockOptsCallCount

func (fake *FakeClient) LockOptsCallCount() int

func (*FakeClient) LockOptsReturns

func (fake *FakeClient) LockOptsReturns(result1 consuladapter.Lock, result2 error)

func (*FakeClient) Session

func (fake *FakeClient) Session() consuladapter.Session

func (*FakeClient) SessionCallCount

func (fake *FakeClient) SessionCallCount() int

func (*FakeClient) SessionReturns

func (fake *FakeClient) SessionReturns(result1 consuladapter.Session)

func (*FakeClient) Status

func (fake *FakeClient) Status() consuladapter.Status

func (*FakeClient) StatusCallCount

func (fake *FakeClient) StatusCallCount() int

func (*FakeClient) StatusReturns

func (fake *FakeClient) StatusReturns(result1 consuladapter.Status)

type FakeClientComponents

type FakeClientComponents struct {
	Agent   *FakeAgent
	KV      *FakeKV
	Session *FakeSession
	Catalog *FakeCatalog
}

type FakeKV

type FakeKV struct {
	GetStub func(key string, q *api.QueryOptions) (*api.KVPair, *api.QueryMeta, error)

	ListStub func(prefix string, q *api.QueryOptions) (api.KVPairs, *api.QueryMeta, error)

	PutStub func(p *api.KVPair, q *api.WriteOptions) (*api.WriteMeta, error)

	ReleaseStub func(p *api.KVPair, q *api.WriteOptions) (bool, *api.WriteMeta, error)

	DeleteTreeStub func(prefix string, w *api.WriteOptions) (*api.WriteMeta, error)
	// contains filtered or unexported fields
}

func (*FakeKV) DeleteTree

func (fake *FakeKV) DeleteTree(prefix string, w *api.WriteOptions) (*api.WriteMeta, error)

func (*FakeKV) DeleteTreeArgsForCall

func (fake *FakeKV) DeleteTreeArgsForCall(i int) (string, *api.WriteOptions)

func (*FakeKV) DeleteTreeCallCount

func (fake *FakeKV) DeleteTreeCallCount() int

func (*FakeKV) DeleteTreeReturns

func (fake *FakeKV) DeleteTreeReturns(result1 *api.WriteMeta, result2 error)

func (*FakeKV) Get

func (fake *FakeKV) Get(key string, q *api.QueryOptions) (*api.KVPair, *api.QueryMeta, error)

func (*FakeKV) GetArgsForCall

func (fake *FakeKV) GetArgsForCall(i int) (string, *api.QueryOptions)

func (*FakeKV) GetCallCount

func (fake *FakeKV) GetCallCount() int

func (*FakeKV) GetReturns

func (fake *FakeKV) GetReturns(result1 *api.KVPair, result2 *api.QueryMeta, result3 error)

func (*FakeKV) List

func (fake *FakeKV) List(prefix string, q *api.QueryOptions) (api.KVPairs, *api.QueryMeta, error)

func (*FakeKV) ListArgsForCall

func (fake *FakeKV) ListArgsForCall(i int) (string, *api.QueryOptions)

func (*FakeKV) ListCallCount

func (fake *FakeKV) ListCallCount() int

func (*FakeKV) ListReturns

func (fake *FakeKV) ListReturns(result1 api.KVPairs, result2 *api.QueryMeta, result3 error)

func (*FakeKV) Put

func (fake *FakeKV) Put(p *api.KVPair, q *api.WriteOptions) (*api.WriteMeta, error)

func (*FakeKV) PutArgsForCall

func (fake *FakeKV) PutArgsForCall(i int) (*api.KVPair, *api.WriteOptions)

func (*FakeKV) PutCallCount

func (fake *FakeKV) PutCallCount() int

func (*FakeKV) PutReturns

func (fake *FakeKV) PutReturns(result1 *api.WriteMeta, result2 error)

func (*FakeKV) Release

func (fake *FakeKV) Release(p *api.KVPair, q *api.WriteOptions) (bool, *api.WriteMeta, error)

func (*FakeKV) ReleaseArgsForCall

func (fake *FakeKV) ReleaseArgsForCall(i int) (*api.KVPair, *api.WriteOptions)

func (*FakeKV) ReleaseCallCount

func (fake *FakeKV) ReleaseCallCount() int

func (*FakeKV) ReleaseReturns

func (fake *FakeKV) ReleaseReturns(result1 bool, result2 *api.WriteMeta, result3 error)

type FakeLock

type FakeLock struct {
	LockStub func(stopCh <-chan struct{}) (lostLock <-chan struct{}, err error)
	// contains filtered or unexported fields
}

func (*FakeLock) Lock

func (fake *FakeLock) Lock(stopCh <-chan struct{}) (lostLock <-chan struct{}, err error)

func (*FakeLock) LockArgsForCall

func (fake *FakeLock) LockArgsForCall(i int) <-chan struct{}

func (*FakeLock) LockCallCount

func (fake *FakeLock) LockCallCount() int

func (*FakeLock) LockReturns

func (fake *FakeLock) LockReturns(result1 <-chan struct{}, result2 error)

type FakeSession

type FakeSession struct {
	CreateStub func(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)

	CreateNoChecksStub func(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)

	DestroyStub func(id string, q *api.WriteOptions) (*api.WriteMeta, error)

	InfoStub func(id string, q *api.QueryOptions) (*api.SessionEntry, *api.QueryMeta, error)

	ListStub func(q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)

	NodeStub func(node string, q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)

	RenewStub func(id string, q *api.WriteOptions) (*api.SessionEntry, *api.WriteMeta, error)

	RenewPeriodicStub func(initialTTL string, id string, q *api.WriteOptions, doneCh chan struct{}) error
	// contains filtered or unexported fields
}

func (*FakeSession) Create

func (fake *FakeSession) Create(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)

func (*FakeSession) CreateArgsForCall

func (fake *FakeSession) CreateArgsForCall(i int) (*api.SessionEntry, *api.WriteOptions)

func (*FakeSession) CreateCallCount

func (fake *FakeSession) CreateCallCount() int

func (*FakeSession) CreateNoChecks

func (fake *FakeSession) CreateNoChecks(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)

func (*FakeSession) CreateNoChecksArgsForCall

func (fake *FakeSession) CreateNoChecksArgsForCall(i int) (*api.SessionEntry, *api.WriteOptions)

func (*FakeSession) CreateNoChecksCallCount

func (fake *FakeSession) CreateNoChecksCallCount() int

func (*FakeSession) CreateNoChecksReturns

func (fake *FakeSession) CreateNoChecksReturns(result1 string, result2 *api.WriteMeta, result3 error)

func (*FakeSession) CreateReturns

func (fake *FakeSession) CreateReturns(result1 string, result2 *api.WriteMeta, result3 error)

func (*FakeSession) Destroy

func (fake *FakeSession) Destroy(id string, q *api.WriteOptions) (*api.WriteMeta, error)

func (*FakeSession) DestroyArgsForCall

func (fake *FakeSession) DestroyArgsForCall(i int) (string, *api.WriteOptions)

func (*FakeSession) DestroyCallCount

func (fake *FakeSession) DestroyCallCount() int

func (*FakeSession) DestroyReturns

func (fake *FakeSession) DestroyReturns(result1 *api.WriteMeta, result2 error)

func (*FakeSession) Info

func (*FakeSession) InfoArgsForCall

func (fake *FakeSession) InfoArgsForCall(i int) (string, *api.QueryOptions)

func (*FakeSession) InfoCallCount

func (fake *FakeSession) InfoCallCount() int

func (*FakeSession) InfoReturns

func (fake *FakeSession) InfoReturns(result1 *api.SessionEntry, result2 *api.QueryMeta, result3 error)

func (*FakeSession) List

func (fake *FakeSession) List(q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)

func (*FakeSession) ListArgsForCall

func (fake *FakeSession) ListArgsForCall(i int) *api.QueryOptions

func (*FakeSession) ListCallCount

func (fake *FakeSession) ListCallCount() int

func (*FakeSession) ListReturns

func (fake *FakeSession) ListReturns(result1 []*api.SessionEntry, result2 *api.QueryMeta, result3 error)

func (*FakeSession) Node

func (fake *FakeSession) Node(node string, q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)

func (*FakeSession) NodeArgsForCall

func (fake *FakeSession) NodeArgsForCall(i int) (string, *api.QueryOptions)

func (*FakeSession) NodeCallCount

func (fake *FakeSession) NodeCallCount() int

func (*FakeSession) NodeReturns

func (fake *FakeSession) NodeReturns(result1 []*api.SessionEntry, result2 *api.QueryMeta, result3 error)

func (*FakeSession) Renew

func (fake *FakeSession) Renew(id string, q *api.WriteOptions) (*api.SessionEntry, *api.WriteMeta, error)

func (*FakeSession) RenewArgsForCall

func (fake *FakeSession) RenewArgsForCall(i int) (string, *api.WriteOptions)

func (*FakeSession) RenewCallCount

func (fake *FakeSession) RenewCallCount() int

func (*FakeSession) RenewPeriodic

func (fake *FakeSession) RenewPeriodic(initialTTL string, id string, q *api.WriteOptions, doneCh chan struct{}) error

func (*FakeSession) RenewPeriodicArgsForCall

func (fake *FakeSession) RenewPeriodicArgsForCall(i int) (string, string, *api.WriteOptions, chan struct{})

func (*FakeSession) RenewPeriodicCallCount

func (fake *FakeSession) RenewPeriodicCallCount() int

func (*FakeSession) RenewPeriodicReturns

func (fake *FakeSession) RenewPeriodicReturns(result1 error)

func (*FakeSession) RenewReturns

func (fake *FakeSession) RenewReturns(result1 *api.SessionEntry, result2 *api.WriteMeta, result3 error)

type FakeStatus

type FakeStatus struct {
	LeaderStub func() (string, error)

	PeersStub func() ([]string, error)
	// contains filtered or unexported fields
}

func (*FakeStatus) Leader

func (fake *FakeStatus) Leader() (string, error)

func (*FakeStatus) LeaderCallCount

func (fake *FakeStatus) LeaderCallCount() int

func (*FakeStatus) LeaderReturns

func (fake *FakeStatus) LeaderReturns(result1 string, result2 error)

func (*FakeStatus) Peers

func (fake *FakeStatus) Peers() ([]string, error)

func (*FakeStatus) PeersCallCount

func (fake *FakeStatus) PeersCallCount() int

func (*FakeStatus) PeersReturns

func (fake *FakeStatus) PeersReturns(result1 []string, result2 error)

Jump to

Keyboard shortcuts

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