Documentation ¶
Index ¶
- Constants
- type Address
- type Agent
- type AgentInfo
- type AgentMock
- func (mmForceLeave *AgentMock) ForceLeave(ctx Ctx, node string) (err error)
- func (mmForceLeave *AgentMock) ForceLeaveAfterCounter() uint64
- func (mmForceLeave *AgentMock) ForceLeaveBeforeCounter() uint64
- func (mmJoin *AgentMock) Join(ctx Ctx, address string, wan bool) (err error)
- func (mmJoin *AgentMock) JoinAfterCounter() uint64
- func (mmJoin *AgentMock) JoinBeforeCounter() uint64
- func (mmLeave *AgentMock) Leave(ctx Ctx) (err error)
- func (mmLeave *AgentMock) LeaveAfterCounter() uint64
- func (mmLeave *AgentMock) LeaveBeforeCounter() uint64
- func (mmMaintenanceMode *AgentMock) MaintenanceMode(ctx Ctx, enabled bool, reason string) (err error)
- func (mmMaintenanceMode *AgentMock) MaintenanceModeAfterCounter() uint64
- func (mmMaintenanceMode *AgentMock) MaintenanceModeBeforeCounter() uint64
- func (mmMembers *AgentMock) Members(ctx Ctx, wan bool) (aa1 []AgentInfo, err error)
- func (mmMembers *AgentMock) MembersAfterCounter() uint64
- func (mmMembers *AgentMock) MembersBeforeCounter() uint64
- func (mmMetrics *AgentMock) Metrics(ctx Ctx) (m1 Metrics, err error)
- func (mmMetrics *AgentMock) MetricsAfterCounter() uint64
- func (mmMetrics *AgentMock) MetricsBeforeCounter() uint64
- func (m *AgentMock) MinimockFinish()
- func (m *AgentMock) MinimockForceLeaveDone() bool
- func (m *AgentMock) MinimockForceLeaveInspect()
- func (m *AgentMock) MinimockJoinDone() bool
- func (m *AgentMock) MinimockJoinInspect()
- func (m *AgentMock) MinimockLeaveDone() bool
- func (m *AgentMock) MinimockLeaveInspect()
- func (m *AgentMock) MinimockMaintenanceModeDone() bool
- func (m *AgentMock) MinimockMaintenanceModeInspect()
- func (m *AgentMock) MinimockMembersDone() bool
- func (m *AgentMock) MinimockMembersInspect()
- func (m *AgentMock) MinimockMetricsDone() bool
- func (m *AgentMock) MinimockMetricsInspect()
- func (m *AgentMock) MinimockReloadDone() bool
- func (m *AgentMock) MinimockReloadInspect()
- func (m *AgentMock) MinimockSelfDone() bool
- func (m *AgentMock) MinimockSelfInspect()
- func (m *AgentMock) MinimockSetACLTokenDone() bool
- func (m *AgentMock) MinimockSetACLTokenInspect()
- func (m *AgentMock) MinimockWait(timeout mm_time.Duration)
- func (mmReload *AgentMock) Reload(ctx Ctx) (err error)
- func (mmReload *AgentMock) ReloadAfterCounter() uint64
- func (mmReload *AgentMock) ReloadBeforeCounter() uint64
- func (mmSelf *AgentMock) Self(ctx Ctx) (a1 AgentInfo, err error)
- func (mmSelf *AgentMock) SelfAfterCounter() uint64
- func (mmSelf *AgentMock) SelfBeforeCounter() uint64
- func (mmSetACLToken *AgentMock) SetACLToken(ctx Ctx, kind string, token string) (err error)
- func (mmSetACLToken *AgentMock) SetACLTokenAfterCounter() uint64
- func (mmSetACLToken *AgentMock) SetACLTokenBeforeCounter() uint64
- type AgentMockForceLeaveExpectation
- type AgentMockForceLeaveParams
- type AgentMockForceLeaveResults
- type AgentMockJoinExpectation
- type AgentMockJoinParams
- type AgentMockJoinResults
- type AgentMockLeaveExpectation
- type AgentMockLeaveParams
- type AgentMockLeaveResults
- type AgentMockMaintenanceModeExpectation
- type AgentMockMaintenanceModeParams
- type AgentMockMaintenanceModeResults
- type AgentMockMembersExpectation
- type AgentMockMembersParams
- type AgentMockMembersResults
- type AgentMockMetricsExpectation
- type AgentMockMetricsParams
- type AgentMockMetricsResults
- type AgentMockReloadExpectation
- type AgentMockReloadParams
- type AgentMockReloadResults
- type AgentMockSelfExpectation
- type AgentMockSelfParams
- type AgentMockSelfResults
- type AgentMockSetACLTokenExpectation
- type AgentMockSetACLTokenParams
- type AgentMockSetACLTokenResults
- type AsLeaderFunc
- type Candidate
- type CandidateMock
- func (m *CandidateMock) MinimockFinish()
- func (m *CandidateMock) MinimockParticipateDone() bool
- func (m *CandidateMock) MinimockParticipateInspect()
- func (m *CandidateMock) MinimockWait(timeout mm_time.Duration)
- func (mmParticipate *CandidateMock) Participate(c1 Ctx, l1 LeadershipConfig, a1 AsLeaderFunc) (l2 LeaderSession, err error)
- func (mmParticipate *CandidateMock) ParticipateAfterCounter() uint64
- func (mmParticipate *CandidateMock) ParticipateBeforeCounter() uint64
- type CandidateMockParticipateExpectation
- type CandidateMockParticipateParams
- type CandidateMockParticipateResults
- type Catalog
- type CatalogMock
- func (mmConnect *CatalogMock) Connect(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
- func (mmConnect *CatalogMock) ConnectAfterCounter() uint64
- func (mmConnect *CatalogMock) ConnectBeforeCounter() uint64
- func (mmDataCenters *CatalogMock) DataCenters(c1 Ctx) (sa1 []string, err error)
- func (mmDataCenters *CatalogMock) DataCentersAfterCounter() uint64
- func (mmDataCenters *CatalogMock) DataCentersBeforeCounter() uint64
- func (m *CatalogMock) MinimockConnectDone() bool
- func (m *CatalogMock) MinimockConnectInspect()
- func (m *CatalogMock) MinimockDataCentersDone() bool
- func (m *CatalogMock) MinimockDataCentersInspect()
- func (m *CatalogMock) MinimockFinish()
- func (m *CatalogMock) MinimockNodeDone() bool
- func (m *CatalogMock) MinimockNodeInspect()
- func (m *CatalogMock) MinimockNodesDone() bool
- func (m *CatalogMock) MinimockNodesInspect()
- func (m *CatalogMock) MinimockServiceDone() bool
- func (m *CatalogMock) MinimockServiceInspect()
- func (m *CatalogMock) MinimockServicesDone() bool
- func (m *CatalogMock) MinimockServicesInspect()
- func (m *CatalogMock) MinimockWait(timeout mm_time.Duration)
- func (mmNode *CatalogMock) Node(c1 Ctx, s1 string, n1 NodeQuery) (n2 NodeInfo, err error)
- func (mmNode *CatalogMock) NodeAfterCounter() uint64
- func (mmNode *CatalogMock) NodeBeforeCounter() uint64
- func (mmNodes *CatalogMock) Nodes(c1 Ctx, n1 NodesQuery) (na1 []Node, err error)
- func (mmNodes *CatalogMock) NodesAfterCounter() uint64
- func (mmNodes *CatalogMock) NodesBeforeCounter() uint64
- func (mmService *CatalogMock) Service(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
- func (mmService *CatalogMock) ServiceAfterCounter() uint64
- func (mmService *CatalogMock) ServiceBeforeCounter() uint64
- func (mmServices *CatalogMock) Services(c1 Ctx, s1 ServicesQuery) (m1 map[string][]string, err error)
- func (mmServices *CatalogMock) ServicesAfterCounter() uint64
- func (mmServices *CatalogMock) ServicesBeforeCounter() uint64
- type CatalogMockConnectExpectation
- type CatalogMockConnectParams
- type CatalogMockConnectResults
- type CatalogMockDataCentersExpectation
- type CatalogMockDataCentersParams
- type CatalogMockDataCentersResults
- type CatalogMockNodeExpectation
- type CatalogMockNodeParams
- type CatalogMockNodeResults
- type CatalogMockNodesExpectation
- type CatalogMockNodesParams
- type CatalogMockNodesResults
- type CatalogMockServiceExpectation
- type CatalogMockServiceParams
- type CatalogMockServiceResults
- type CatalogMockServicesExpectation
- type CatalogMockServicesParams
- type CatalogMockServicesResults
- type Client
- type ClientMock
- func (mmConnect *ClientMock) Connect(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
- func (mmConnect *ClientMock) ConnectAfterCounter() uint64
- func (mmConnect *ClientMock) ConnectBeforeCounter() uint64
- func (mmCreateSession *ClientMock) CreateSession(c1 Ctx, s1 SessionConfig) (s2 SessionID, err error)
- func (mmCreateSession *ClientMock) CreateSessionAfterCounter() uint64
- func (mmCreateSession *ClientMock) CreateSessionBeforeCounter() uint64
- func (mmDataCenters *ClientMock) DataCenters(c1 Ctx) (sa1 []string, err error)
- func (mmDataCenters *ClientMock) DataCentersAfterCounter() uint64
- func (mmDataCenters *ClientMock) DataCentersBeforeCounter() uint64
- func (mmDelete *ClientMock) Delete(c1 Ctx, s1 string, q1 Query) (err error)
- func (mmDelete *ClientMock) DeleteAfterCounter() uint64
- func (mmDelete *ClientMock) DeleteBeforeCounter() uint64
- func (mmDeleteSession *ClientMock) DeleteSession(c1 Ctx, s1 SessionQuery) (err error)
- func (mmDeleteSession *ClientMock) DeleteSessionAfterCounter() uint64
- func (mmDeleteSession *ClientMock) DeleteSessionBeforeCounter() uint64
- func (mmForceLeave *ClientMock) ForceLeave(ctx Ctx, node string) (err error)
- func (mmForceLeave *ClientMock) ForceLeaveAfterCounter() uint64
- func (mmForceLeave *ClientMock) ForceLeaveBeforeCounter() uint64
- func (mmGet *ClientMock) Get(c1 Ctx, s1 string, q1 Query) (s2 string, err error)
- func (mmGet *ClientMock) GetAfterCounter() uint64
- func (mmGet *ClientMock) GetBeforeCounter() uint64
- func (mmJoin *ClientMock) Join(ctx Ctx, address string, wan bool) (err error)
- func (mmJoin *ClientMock) JoinAfterCounter() uint64
- func (mmJoin *ClientMock) JoinBeforeCounter() uint64
- func (mmKeys *ClientMock) Keys(c1 Ctx, s1 string, q1 Query) (sa1 []string, err error)
- func (mmKeys *ClientMock) KeysAfterCounter() uint64
- func (mmKeys *ClientMock) KeysBeforeCounter() uint64
- func (mmLeave *ClientMock) Leave(ctx Ctx) (err error)
- func (mmLeave *ClientMock) LeaveAfterCounter() uint64
- func (mmLeave *ClientMock) LeaveBeforeCounter() uint64
- func (mmListSessions *ClientMock) ListSessions(ctx Ctx, dc string, node string) (m1 map[SessionID]SessionConfig, err error)
- func (mmListSessions *ClientMock) ListSessionsAfterCounter() uint64
- func (mmListSessions *ClientMock) ListSessionsBeforeCounter() uint64
- func (mmMaintenanceMode *ClientMock) MaintenanceMode(ctx Ctx, enabled bool, reason string) (err error)
- func (mmMaintenanceMode *ClientMock) MaintenanceModeAfterCounter() uint64
- func (mmMaintenanceMode *ClientMock) MaintenanceModeBeforeCounter() uint64
- func (mmMembers *ClientMock) Members(ctx Ctx, wan bool) (aa1 []AgentInfo, err error)
- func (mmMembers *ClientMock) MembersAfterCounter() uint64
- func (mmMembers *ClientMock) MembersBeforeCounter() uint64
- func (mmMetrics *ClientMock) Metrics(ctx Ctx) (m1 Metrics, err error)
- func (mmMetrics *ClientMock) MetricsAfterCounter() uint64
- func (mmMetrics *ClientMock) MetricsBeforeCounter() uint64
- func (m *ClientMock) MinimockConnectDone() bool
- func (m *ClientMock) MinimockConnectInspect()
- func (m *ClientMock) MinimockCreateSessionDone() bool
- func (m *ClientMock) MinimockCreateSessionInspect()
- func (m *ClientMock) MinimockDataCentersDone() bool
- func (m *ClientMock) MinimockDataCentersInspect()
- func (m *ClientMock) MinimockDeleteDone() bool
- func (m *ClientMock) MinimockDeleteInspect()
- func (m *ClientMock) MinimockDeleteSessionDone() bool
- func (m *ClientMock) MinimockDeleteSessionInspect()
- func (m *ClientMock) MinimockFinish()
- func (m *ClientMock) MinimockForceLeaveDone() bool
- func (m *ClientMock) MinimockForceLeaveInspect()
- func (m *ClientMock) MinimockGetDone() bool
- func (m *ClientMock) MinimockGetInspect()
- func (m *ClientMock) MinimockJoinDone() bool
- func (m *ClientMock) MinimockJoinInspect()
- func (m *ClientMock) MinimockKeysDone() bool
- func (m *ClientMock) MinimockKeysInspect()
- func (m *ClientMock) MinimockLeaveDone() bool
- func (m *ClientMock) MinimockLeaveInspect()
- func (m *ClientMock) MinimockListSessionsDone() bool
- func (m *ClientMock) MinimockListSessionsInspect()
- func (m *ClientMock) MinimockMaintenanceModeDone() bool
- func (m *ClientMock) MinimockMaintenanceModeInspect()
- func (m *ClientMock) MinimockMembersDone() bool
- func (m *ClientMock) MinimockMembersInspect()
- func (m *ClientMock) MinimockMetricsDone() bool
- func (m *ClientMock) MinimockMetricsInspect()
- func (m *ClientMock) MinimockNodeDone() bool
- func (m *ClientMock) MinimockNodeInspect()
- func (m *ClientMock) MinimockNodesDone() bool
- func (m *ClientMock) MinimockNodesInspect()
- func (m *ClientMock) MinimockParticipateDone() bool
- func (m *ClientMock) MinimockParticipateInspect()
- func (m *ClientMock) MinimockPutDone() bool
- func (m *ClientMock) MinimockPutInspect()
- func (m *ClientMock) MinimockReadSessionDone() bool
- func (m *ClientMock) MinimockReadSessionInspect()
- func (m *ClientMock) MinimockRecurseDone() bool
- func (m *ClientMock) MinimockRecurseInspect()
- func (m *ClientMock) MinimockReloadDone() bool
- func (m *ClientMock) MinimockReloadInspect()
- func (m *ClientMock) MinimockRenewSessionDone() bool
- func (m *ClientMock) MinimockRenewSessionInspect()
- func (m *ClientMock) MinimockSelfDone() bool
- func (m *ClientMock) MinimockSelfInspect()
- func (m *ClientMock) MinimockServiceDone() bool
- func (m *ClientMock) MinimockServiceInspect()
- func (m *ClientMock) MinimockServicesDone() bool
- func (m *ClientMock) MinimockServicesInspect()
- func (m *ClientMock) MinimockSetACLTokenDone() bool
- func (m *ClientMock) MinimockSetACLTokenInspect()
- func (m *ClientMock) MinimockWait(timeout mm_time.Duration)
- func (mmNode *ClientMock) Node(c1 Ctx, s1 string, n1 NodeQuery) (n2 NodeInfo, err error)
- func (mmNode *ClientMock) NodeAfterCounter() uint64
- func (mmNode *ClientMock) NodeBeforeCounter() uint64
- func (mmNodes *ClientMock) Nodes(c1 Ctx, n1 NodesQuery) (na1 []Node, err error)
- func (mmNodes *ClientMock) NodesAfterCounter() uint64
- func (mmNodes *ClientMock) NodesBeforeCounter() uint64
- func (mmParticipate *ClientMock) Participate(c1 Ctx, l1 LeadershipConfig, a1 AsLeaderFunc) (l2 LeaderSession, err error)
- func (mmParticipate *ClientMock) ParticipateAfterCounter() uint64
- func (mmParticipate *ClientMock) ParticipateBeforeCounter() uint64
- func (mmPut *ClientMock) Put(c1 Ctx, s1 string, s2 string, q1 Query) (err error)
- func (mmPut *ClientMock) PutAfterCounter() uint64
- func (mmPut *ClientMock) PutBeforeCounter() uint64
- func (mmReadSession *ClientMock) ReadSession(c1 Ctx, s1 SessionQuery) (s2 SessionConfig, err error)
- func (mmReadSession *ClientMock) ReadSessionAfterCounter() uint64
- func (mmReadSession *ClientMock) ReadSessionBeforeCounter() uint64
- func (mmRecurse *ClientMock) Recurse(c1 Ctx, s1 string, q1 Query) (pa1 []Pair, err error)
- func (mmRecurse *ClientMock) RecurseAfterCounter() uint64
- func (mmRecurse *ClientMock) RecurseBeforeCounter() uint64
- func (mmReload *ClientMock) Reload(ctx Ctx) (err error)
- func (mmReload *ClientMock) ReloadAfterCounter() uint64
- func (mmReload *ClientMock) ReloadBeforeCounter() uint64
- func (mmRenewSession *ClientMock) RenewSession(c1 Ctx, s1 SessionQuery) (d1 time.Duration, err error)
- func (mmRenewSession *ClientMock) RenewSessionAfterCounter() uint64
- func (mmRenewSession *ClientMock) RenewSessionBeforeCounter() uint64
- func (mmSelf *ClientMock) Self(ctx Ctx) (a1 AgentInfo, err error)
- func (mmSelf *ClientMock) SelfAfterCounter() uint64
- func (mmSelf *ClientMock) SelfBeforeCounter() uint64
- func (mmService *ClientMock) Service(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
- func (mmService *ClientMock) ServiceAfterCounter() uint64
- func (mmService *ClientMock) ServiceBeforeCounter() uint64
- func (mmServices *ClientMock) Services(c1 Ctx, s1 ServicesQuery) (m1 map[string][]string, err error)
- func (mmServices *ClientMock) ServicesAfterCounter() uint64
- func (mmServices *ClientMock) ServicesBeforeCounter() uint64
- func (mmSetACLToken *ClientMock) SetACLToken(ctx Ctx, kind string, token string) (err error)
- func (mmSetACLToken *ClientMock) SetACLTokenAfterCounter() uint64
- func (mmSetACLToken *ClientMock) SetACLTokenBeforeCounter() uint64
- type ClientMockConnectExpectation
- type ClientMockConnectParams
- type ClientMockConnectResults
- type ClientMockCreateSessionExpectation
- type ClientMockCreateSessionParams
- type ClientMockCreateSessionResults
- type ClientMockDataCentersExpectation
- type ClientMockDataCentersParams
- type ClientMockDataCentersResults
- type ClientMockDeleteExpectation
- type ClientMockDeleteParams
- type ClientMockDeleteResults
- type ClientMockDeleteSessionExpectation
- type ClientMockDeleteSessionParams
- type ClientMockDeleteSessionResults
- type ClientMockForceLeaveExpectation
- type ClientMockForceLeaveParams
- type ClientMockForceLeaveResults
- type ClientMockGetExpectation
- type ClientMockGetParams
- type ClientMockGetResults
- type ClientMockJoinExpectation
- type ClientMockJoinParams
- type ClientMockJoinResults
- type ClientMockKeysExpectation
- type ClientMockKeysParams
- type ClientMockKeysResults
- type ClientMockLeaveExpectation
- type ClientMockLeaveParams
- type ClientMockLeaveResults
- type ClientMockListSessionsExpectation
- type ClientMockListSessionsParams
- type ClientMockListSessionsResults
- type ClientMockMaintenanceModeExpectation
- type ClientMockMaintenanceModeParams
- type ClientMockMaintenanceModeResults
- type ClientMockMembersExpectation
- type ClientMockMembersParams
- type ClientMockMembersResults
- type ClientMockMetricsExpectation
- type ClientMockMetricsParams
- type ClientMockMetricsResults
- type ClientMockNodeExpectation
- type ClientMockNodeParams
- type ClientMockNodeResults
- type ClientMockNodesExpectation
- type ClientMockNodesParams
- type ClientMockNodesResults
- type ClientMockParticipateExpectation
- type ClientMockParticipateParams
- type ClientMockParticipateResults
- type ClientMockPutExpectation
- type ClientMockPutParams
- type ClientMockPutResults
- type ClientMockReadSessionExpectation
- type ClientMockReadSessionParams
- type ClientMockReadSessionResults
- type ClientMockRecurseExpectation
- type ClientMockRecurseParams
- type ClientMockRecurseResults
- type ClientMockReloadExpectation
- type ClientMockReloadParams
- type ClientMockReloadResults
- type ClientMockRenewSessionExpectation
- type ClientMockRenewSessionParams
- type ClientMockRenewSessionResults
- type ClientMockSelfExpectation
- type ClientMockSelfParams
- type ClientMockSelfResults
- type ClientMockServiceExpectation
- type ClientMockServiceParams
- type ClientMockServiceResults
- type ClientMockServicesExpectation
- type ClientMockServicesParams
- type ClientMockServicesResults
- type ClientMockSetACLTokenExpectation
- type ClientMockSetACLTokenParams
- type ClientMockSetACLTokenResults
- type ClientOptions
- type Counter
- type Ctx
- type Gauge
- type Instance
- type KV
- type KVMock
- func (mmDelete *KVMock) Delete(c1 Ctx, s1 string, q1 Query) (err error)
- func (mmDelete *KVMock) DeleteAfterCounter() uint64
- func (mmDelete *KVMock) DeleteBeforeCounter() uint64
- func (mmGet *KVMock) Get(c1 Ctx, s1 string, q1 Query) (s2 string, err error)
- func (mmGet *KVMock) GetAfterCounter() uint64
- func (mmGet *KVMock) GetBeforeCounter() uint64
- func (mmKeys *KVMock) Keys(c1 Ctx, s1 string, q1 Query) (sa1 []string, err error)
- func (mmKeys *KVMock) KeysAfterCounter() uint64
- func (mmKeys *KVMock) KeysBeforeCounter() uint64
- func (m *KVMock) MinimockDeleteDone() bool
- func (m *KVMock) MinimockDeleteInspect()
- func (m *KVMock) MinimockFinish()
- func (m *KVMock) MinimockGetDone() bool
- func (m *KVMock) MinimockGetInspect()
- func (m *KVMock) MinimockKeysDone() bool
- func (m *KVMock) MinimockKeysInspect()
- func (m *KVMock) MinimockPutDone() bool
- func (m *KVMock) MinimockPutInspect()
- func (m *KVMock) MinimockRecurseDone() bool
- func (m *KVMock) MinimockRecurseInspect()
- func (m *KVMock) MinimockWait(timeout mm_time.Duration)
- func (mmPut *KVMock) Put(c1 Ctx, s1 string, s2 string, q1 Query) (err error)
- func (mmPut *KVMock) PutAfterCounter() uint64
- func (mmPut *KVMock) PutBeforeCounter() uint64
- func (mmRecurse *KVMock) Recurse(c1 Ctx, s1 string, q1 Query) (pa1 []Pair, err error)
- func (mmRecurse *KVMock) RecurseAfterCounter() uint64
- func (mmRecurse *KVMock) RecurseBeforeCounter() uint64
- type KVMockDeleteExpectation
- type KVMockDeleteParams
- type KVMockDeleteResults
- type KVMockGetExpectation
- type KVMockGetParams
- type KVMockGetResults
- type KVMockKeysExpectation
- type KVMockKeysParams
- type KVMockKeysResults
- type KVMockPutExpectation
- type KVMockPutParams
- type KVMockPutResults
- type KVMockRecurseExpectation
- type KVMockRecurseParams
- type KVMockRecurseResults
- type LeaderSession
- type LeaderSessionMock
- func (mmAbdicate *LeaderSessionMock) Abdicate(c1 Ctx) (err error)
- func (mmAbdicate *LeaderSessionMock) AbdicateAfterCounter() uint64
- func (mmAbdicate *LeaderSessionMock) AbdicateBeforeCounter() uint64
- func (mmCurrent *LeaderSessionMock) Current(c1 Ctx) (s1 string, err error)
- func (mmCurrent *LeaderSessionMock) CurrentAfterCounter() uint64
- func (mmCurrent *LeaderSessionMock) CurrentBeforeCounter() uint64
- func (m *LeaderSessionMock) MinimockAbdicateDone() bool
- func (m *LeaderSessionMock) MinimockAbdicateInspect()
- func (m *LeaderSessionMock) MinimockCurrentDone() bool
- func (m *LeaderSessionMock) MinimockCurrentInspect()
- func (m *LeaderSessionMock) MinimockFinish()
- func (m *LeaderSessionMock) MinimockSessionIDDone() bool
- func (m *LeaderSessionMock) MinimockSessionIDInspect()
- func (m *LeaderSessionMock) MinimockWait(timeout mm_time.Duration)
- func (mmSessionID *LeaderSessionMock) SessionID(c1 Ctx) (s1 string)
- func (mmSessionID *LeaderSessionMock) SessionIDAfterCounter() uint64
- func (mmSessionID *LeaderSessionMock) SessionIDBeforeCounter() uint64
- type LeaderSessionMockAbdicateExpectation
- type LeaderSessionMockAbdicateParams
- type LeaderSessionMockAbdicateResults
- type LeaderSessionMockCurrentExpectation
- type LeaderSessionMockCurrentParams
- type LeaderSessionMockCurrentResults
- type LeaderSessionMockSessionIDExpectation
- type LeaderSessionMockSessionIDParams
- type LeaderSessionMockSessionIDResults
- type LeadershipConfig
- type Metrics
- type Node
- type NodeInfo
- type NodeQuery
- type NodesQuery
- type Pair
- type Proxy
- type Query
- type RequestError
- type Sample
- type ServiceConnect
- type ServiceQuery
- type ServicesQuery
- type Session
- type SessionConfig
- type SessionID
- type SessionMock
- func (mmCreateSession *SessionMock) CreateSession(c1 Ctx, s1 SessionConfig) (s2 SessionID, err error)
- func (mmCreateSession *SessionMock) CreateSessionAfterCounter() uint64
- func (mmCreateSession *SessionMock) CreateSessionBeforeCounter() uint64
- func (mmDeleteSession *SessionMock) DeleteSession(c1 Ctx, s1 SessionQuery) (err error)
- func (mmDeleteSession *SessionMock) DeleteSessionAfterCounter() uint64
- func (mmDeleteSession *SessionMock) DeleteSessionBeforeCounter() uint64
- func (mmListSessions *SessionMock) ListSessions(ctx Ctx, dc string, node string) (m1 map[SessionID]SessionConfig, err error)
- func (mmListSessions *SessionMock) ListSessionsAfterCounter() uint64
- func (mmListSessions *SessionMock) ListSessionsBeforeCounter() uint64
- func (m *SessionMock) MinimockCreateSessionDone() bool
- func (m *SessionMock) MinimockCreateSessionInspect()
- func (m *SessionMock) MinimockDeleteSessionDone() bool
- func (m *SessionMock) MinimockDeleteSessionInspect()
- func (m *SessionMock) MinimockFinish()
- func (m *SessionMock) MinimockListSessionsDone() bool
- func (m *SessionMock) MinimockListSessionsInspect()
- func (m *SessionMock) MinimockReadSessionDone() bool
- func (m *SessionMock) MinimockReadSessionInspect()
- func (m *SessionMock) MinimockRenewSessionDone() bool
- func (m *SessionMock) MinimockRenewSessionInspect()
- func (m *SessionMock) MinimockWait(timeout mm_time.Duration)
- func (mmReadSession *SessionMock) ReadSession(c1 Ctx, s1 SessionQuery) (s2 SessionConfig, err error)
- func (mmReadSession *SessionMock) ReadSessionAfterCounter() uint64
- func (mmReadSession *SessionMock) ReadSessionBeforeCounter() uint64
- func (mmRenewSession *SessionMock) RenewSession(c1 Ctx, s1 SessionQuery) (d1 time.Duration, err error)
- func (mmRenewSession *SessionMock) RenewSessionAfterCounter() uint64
- func (mmRenewSession *SessionMock) RenewSessionBeforeCounter() uint64
- type SessionMockCreateSessionExpectation
- type SessionMockCreateSessionParams
- type SessionMockCreateSessionResults
- type SessionMockDeleteSessionExpectation
- type SessionMockDeleteSessionParams
- type SessionMockDeleteSessionResults
- type SessionMockListSessionsExpectation
- type SessionMockListSessionsParams
- type SessionMockListSessionsResults
- type SessionMockReadSessionExpectation
- type SessionMockReadSessionParams
- type SessionMockReadSessionResults
- type SessionMockRenewSessionExpectation
- type SessionMockRenewSessionParams
- type SessionMockRenewSessionResults
- type SessionQuery
- type SessionTerminationBehavior
Constants ¶
const ( SessionRelease SessionTerminationBehavior = "release" SessionDelete SessionTerminationBehavior = "delete" SessionMinimumTTL = 10 * time.Second SessionMaximumTTL = 86400 * time.Second SessionMinimumLockDelay = 0 * time.Second SessionMaximumLockDelay = 60 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface { // Self reports internal metrics specific to this running instance of the // consul service. // // https://www.consul.io/api/agent.html#read-configuration Self(ctx Ctx) (AgentInfo, error) // Members reports what instances of the consul service belong to the // consul cluster. If wan is true, the // // https://www.consul.io/api/agent.html#list-members Members(ctx Ctx, wan bool) ([]AgentInfo, error) // Reload the consul service config files. // // https://www.consul.io/api/agent.html#reload-agent Reload(ctx Ctx) error // MaintenanceMode puts a consul instance into a mode where the node is // marked unavailable, and will not be present in DNS or API queries. // // https://www.consul.io/api/agent.html#enable-maintenance-mode MaintenanceMode(ctx Ctx, enabled bool, reason string) error // Metrics will report about the consul instance. // // https://www.consul.io/api/agent.html#view-metrics Metrics(ctx Ctx) (Metrics, error) // Join the consul instance with an existing consul cluster. // // https://www.consul.io/api/agent.html#join-agent Join(ctx Ctx, address string, wan bool) error // Leave the consul cluster. // // https://www.consul.io/api/agent.html#graceful-leave-and-shutdown Leave(ctx Ctx) error // ForceLeave will purge the named node from the consul cluster. // // https://www.consul.io/api/agent.html#force-leave-and-shutdown ForceLeave(ctx Ctx, node string) error // SetACLToken will set the given kind of token to the value. // // https://www.consul.io/api/agent.html#update-acl-tokens SetACLToken(ctx Ctx, kind, token string) error }
Agent provides an interface to information about the consul agent that is being communicated with.
type AgentInfo ¶
type AgentInfo struct { Name string `json:"Name"` Address string `json:"Addr"` Port int `json:"Port"` Tags map[string]string `json:"Tags"` }
An AgentInfo contains information about a particular consul agent.
type AgentMock ¶ added in v1.1.3
type AgentMock struct { ForceLeaveMock mAgentMockForceLeave JoinMock mAgentMockJoin LeaveMock mAgentMockLeave MaintenanceModeMock mAgentMockMaintenanceMode MembersMock mAgentMockMembers MetricsMock mAgentMockMetrics ReloadMock mAgentMockReload SelfMock mAgentMockSelf SetACLTokenMock mAgentMockSetACLToken // contains filtered or unexported fields }
AgentMock implements Agent
func NewAgentMock ¶ added in v1.1.3
func NewAgentMock(t minimock.Tester) *AgentMock
NewAgentMock returns a mock for Agent
func (*AgentMock) ForceLeave ¶ added in v1.1.3
ForceLeave implements Agent
func (*AgentMock) ForceLeaveAfterCounter ¶ added in v1.1.3
ForceLeaveAfterCounter returns a count of finished AgentMock.ForceLeave invocations
func (*AgentMock) ForceLeaveBeforeCounter ¶ added in v1.1.3
ForceLeaveBeforeCounter returns a count of AgentMock.ForceLeave invocations
func (*AgentMock) JoinAfterCounter ¶ added in v1.1.3
JoinAfterCounter returns a count of finished AgentMock.Join invocations
func (*AgentMock) JoinBeforeCounter ¶ added in v1.1.3
JoinBeforeCounter returns a count of AgentMock.Join invocations
func (*AgentMock) LeaveAfterCounter ¶ added in v1.1.3
LeaveAfterCounter returns a count of finished AgentMock.Leave invocations
func (*AgentMock) LeaveBeforeCounter ¶ added in v1.1.3
LeaveBeforeCounter returns a count of AgentMock.Leave invocations
func (*AgentMock) MaintenanceMode ¶ added in v1.1.3
func (mmMaintenanceMode *AgentMock) MaintenanceMode(ctx Ctx, enabled bool, reason string) (err error)
MaintenanceMode implements Agent
func (*AgentMock) MaintenanceModeAfterCounter ¶ added in v1.1.3
MaintenanceModeAfterCounter returns a count of finished AgentMock.MaintenanceMode invocations
func (*AgentMock) MaintenanceModeBeforeCounter ¶ added in v1.1.3
MaintenanceModeBeforeCounter returns a count of AgentMock.MaintenanceMode invocations
func (*AgentMock) MembersAfterCounter ¶ added in v1.1.3
MembersAfterCounter returns a count of finished AgentMock.Members invocations
func (*AgentMock) MembersBeforeCounter ¶ added in v1.1.3
MembersBeforeCounter returns a count of AgentMock.Members invocations
func (*AgentMock) MetricsAfterCounter ¶ added in v1.1.3
MetricsAfterCounter returns a count of finished AgentMock.Metrics invocations
func (*AgentMock) MetricsBeforeCounter ¶ added in v1.1.3
MetricsBeforeCounter returns a count of AgentMock.Metrics invocations
func (*AgentMock) MinimockFinish ¶ added in v1.1.3
func (m *AgentMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*AgentMock) MinimockForceLeaveDone ¶ added in v1.1.3
MinimockForceLeaveDone returns true if the count of the ForceLeave invocations corresponds the number of defined expectations
func (*AgentMock) MinimockForceLeaveInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockForceLeaveInspect()
MinimockForceLeaveInspect logs each unmet expectation
func (*AgentMock) MinimockJoinDone ¶ added in v1.1.3
MinimockJoinDone returns true if the count of the Join invocations corresponds the number of defined expectations
func (*AgentMock) MinimockJoinInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockJoinInspect()
MinimockJoinInspect logs each unmet expectation
func (*AgentMock) MinimockLeaveDone ¶ added in v1.1.3
MinimockLeaveDone returns true if the count of the Leave invocations corresponds the number of defined expectations
func (*AgentMock) MinimockLeaveInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockLeaveInspect()
MinimockLeaveInspect logs each unmet expectation
func (*AgentMock) MinimockMaintenanceModeDone ¶ added in v1.1.3
MinimockMaintenanceModeDone returns true if the count of the MaintenanceMode invocations corresponds the number of defined expectations
func (*AgentMock) MinimockMaintenanceModeInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockMaintenanceModeInspect()
MinimockMaintenanceModeInspect logs each unmet expectation
func (*AgentMock) MinimockMembersDone ¶ added in v1.1.3
MinimockMembersDone returns true if the count of the Members invocations corresponds the number of defined expectations
func (*AgentMock) MinimockMembersInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockMembersInspect()
MinimockMembersInspect logs each unmet expectation
func (*AgentMock) MinimockMetricsDone ¶ added in v1.1.3
MinimockMetricsDone returns true if the count of the Metrics invocations corresponds the number of defined expectations
func (*AgentMock) MinimockMetricsInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockMetricsInspect()
MinimockMetricsInspect logs each unmet expectation
func (*AgentMock) MinimockReloadDone ¶ added in v1.1.3
MinimockReloadDone returns true if the count of the Reload invocations corresponds the number of defined expectations
func (*AgentMock) MinimockReloadInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockReloadInspect()
MinimockReloadInspect logs each unmet expectation
func (*AgentMock) MinimockSelfDone ¶ added in v1.1.3
MinimockSelfDone returns true if the count of the Self invocations corresponds the number of defined expectations
func (*AgentMock) MinimockSelfInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockSelfInspect()
MinimockSelfInspect logs each unmet expectation
func (*AgentMock) MinimockSetACLTokenDone ¶ added in v1.1.3
MinimockSetACLTokenDone returns true if the count of the SetACLToken invocations corresponds the number of defined expectations
func (*AgentMock) MinimockSetACLTokenInspect ¶ added in v1.1.3
func (m *AgentMock) MinimockSetACLTokenInspect()
MinimockSetACLTokenInspect logs each unmet expectation
func (*AgentMock) MinimockWait ¶ added in v1.1.3
MinimockWait waits for all mocked methods to be called the expected number of times
func (*AgentMock) ReloadAfterCounter ¶ added in v1.1.3
ReloadAfterCounter returns a count of finished AgentMock.Reload invocations
func (*AgentMock) ReloadBeforeCounter ¶ added in v1.1.3
ReloadBeforeCounter returns a count of AgentMock.Reload invocations
func (*AgentMock) SelfAfterCounter ¶ added in v1.1.3
SelfAfterCounter returns a count of finished AgentMock.Self invocations
func (*AgentMock) SelfBeforeCounter ¶ added in v1.1.3
SelfBeforeCounter returns a count of AgentMock.Self invocations
func (*AgentMock) SetACLToken ¶ added in v1.1.3
SetACLToken implements Agent
func (*AgentMock) SetACLTokenAfterCounter ¶ added in v1.1.3
SetACLTokenAfterCounter returns a count of finished AgentMock.SetACLToken invocations
func (*AgentMock) SetACLTokenBeforeCounter ¶ added in v1.1.3
SetACLTokenBeforeCounter returns a count of AgentMock.SetACLToken invocations
type AgentMockForceLeaveExpectation ¶ added in v1.1.3
type AgentMockForceLeaveExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockForceLeaveExpectation specifies expectation struct of the Agent.ForceLeave
func (*AgentMockForceLeaveExpectation) Then ¶ added in v1.1.3
func (e *AgentMockForceLeaveExpectation) Then(err error) *AgentMock
Then sets up Agent.ForceLeave return parameters for the expectation previously defined by the When method
type AgentMockForceLeaveParams ¶ added in v1.1.3
type AgentMockForceLeaveParams struct {
// contains filtered or unexported fields
}
AgentMockForceLeaveParams contains parameters of the Agent.ForceLeave
type AgentMockForceLeaveResults ¶ added in v1.1.3
type AgentMockForceLeaveResults struct {
// contains filtered or unexported fields
}
AgentMockForceLeaveResults contains results of the Agent.ForceLeave
type AgentMockJoinExpectation ¶ added in v1.1.3
type AgentMockJoinExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockJoinExpectation specifies expectation struct of the Agent.Join
func (*AgentMockJoinExpectation) Then ¶ added in v1.1.3
func (e *AgentMockJoinExpectation) Then(err error) *AgentMock
Then sets up Agent.Join return parameters for the expectation previously defined by the When method
type AgentMockJoinParams ¶ added in v1.1.3
type AgentMockJoinParams struct {
// contains filtered or unexported fields
}
AgentMockJoinParams contains parameters of the Agent.Join
type AgentMockJoinResults ¶ added in v1.1.3
type AgentMockJoinResults struct {
// contains filtered or unexported fields
}
AgentMockJoinResults contains results of the Agent.Join
type AgentMockLeaveExpectation ¶ added in v1.1.3
type AgentMockLeaveExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockLeaveExpectation specifies expectation struct of the Agent.Leave
func (*AgentMockLeaveExpectation) Then ¶ added in v1.1.3
func (e *AgentMockLeaveExpectation) Then(err error) *AgentMock
Then sets up Agent.Leave return parameters for the expectation previously defined by the When method
type AgentMockLeaveParams ¶ added in v1.1.3
type AgentMockLeaveParams struct {
// contains filtered or unexported fields
}
AgentMockLeaveParams contains parameters of the Agent.Leave
type AgentMockLeaveResults ¶ added in v1.1.3
type AgentMockLeaveResults struct {
// contains filtered or unexported fields
}
AgentMockLeaveResults contains results of the Agent.Leave
type AgentMockMaintenanceModeExpectation ¶ added in v1.1.3
type AgentMockMaintenanceModeExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockMaintenanceModeExpectation specifies expectation struct of the Agent.MaintenanceMode
func (*AgentMockMaintenanceModeExpectation) Then ¶ added in v1.1.3
func (e *AgentMockMaintenanceModeExpectation) Then(err error) *AgentMock
Then sets up Agent.MaintenanceMode return parameters for the expectation previously defined by the When method
type AgentMockMaintenanceModeParams ¶ added in v1.1.3
type AgentMockMaintenanceModeParams struct {
// contains filtered or unexported fields
}
AgentMockMaintenanceModeParams contains parameters of the Agent.MaintenanceMode
type AgentMockMaintenanceModeResults ¶ added in v1.1.3
type AgentMockMaintenanceModeResults struct {
// contains filtered or unexported fields
}
AgentMockMaintenanceModeResults contains results of the Agent.MaintenanceMode
type AgentMockMembersExpectation ¶ added in v1.1.3
type AgentMockMembersExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockMembersExpectation specifies expectation struct of the Agent.Members
type AgentMockMembersParams ¶ added in v1.1.3
type AgentMockMembersParams struct {
// contains filtered or unexported fields
}
AgentMockMembersParams contains parameters of the Agent.Members
type AgentMockMembersResults ¶ added in v1.1.3
type AgentMockMembersResults struct {
// contains filtered or unexported fields
}
AgentMockMembersResults contains results of the Agent.Members
type AgentMockMetricsExpectation ¶ added in v1.1.3
type AgentMockMetricsExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockMetricsExpectation specifies expectation struct of the Agent.Metrics
type AgentMockMetricsParams ¶ added in v1.1.3
type AgentMockMetricsParams struct {
// contains filtered or unexported fields
}
AgentMockMetricsParams contains parameters of the Agent.Metrics
type AgentMockMetricsResults ¶ added in v1.1.3
type AgentMockMetricsResults struct {
// contains filtered or unexported fields
}
AgentMockMetricsResults contains results of the Agent.Metrics
type AgentMockReloadExpectation ¶ added in v1.1.3
type AgentMockReloadExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockReloadExpectation specifies expectation struct of the Agent.Reload
func (*AgentMockReloadExpectation) Then ¶ added in v1.1.3
func (e *AgentMockReloadExpectation) Then(err error) *AgentMock
Then sets up Agent.Reload return parameters for the expectation previously defined by the When method
type AgentMockReloadParams ¶ added in v1.1.3
type AgentMockReloadParams struct {
// contains filtered or unexported fields
}
AgentMockReloadParams contains parameters of the Agent.Reload
type AgentMockReloadResults ¶ added in v1.1.3
type AgentMockReloadResults struct {
// contains filtered or unexported fields
}
AgentMockReloadResults contains results of the Agent.Reload
type AgentMockSelfExpectation ¶ added in v1.1.3
type AgentMockSelfExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockSelfExpectation specifies expectation struct of the Agent.Self
type AgentMockSelfParams ¶ added in v1.1.3
type AgentMockSelfParams struct {
// contains filtered or unexported fields
}
AgentMockSelfParams contains parameters of the Agent.Self
type AgentMockSelfResults ¶ added in v1.1.3
type AgentMockSelfResults struct {
// contains filtered or unexported fields
}
AgentMockSelfResults contains results of the Agent.Self
type AgentMockSetACLTokenExpectation ¶ added in v1.1.3
type AgentMockSetACLTokenExpectation struct { Counter uint64 // contains filtered or unexported fields }
AgentMockSetACLTokenExpectation specifies expectation struct of the Agent.SetACLToken
func (*AgentMockSetACLTokenExpectation) Then ¶ added in v1.1.3
func (e *AgentMockSetACLTokenExpectation) Then(err error) *AgentMock
Then sets up Agent.SetACLToken return parameters for the expectation previously defined by the When method
type AgentMockSetACLTokenParams ¶ added in v1.1.3
type AgentMockSetACLTokenParams struct {
// contains filtered or unexported fields
}
AgentMockSetACLTokenParams contains parameters of the Agent.SetACLToken
type AgentMockSetACLTokenResults ¶ added in v1.1.3
type AgentMockSetACLTokenResults struct {
// contains filtered or unexported fields
}
AgentMockSetACLTokenResults contains results of the Agent.SetACLToken
type AsLeaderFunc ¶
AsLeaderFunc is executed when the client is able to acquire the underlying consul leader lock. When a value is sent on context.Done, this client is no longer the elected leader and must cease any operations that require leadership. A reasonable implementation will return from the function as soon as possible context cancellation.
If the implementation returns from the function before the context is cancelled, leadership will be abdicated, the context will be cancelled, and no further action should be taken until elected leader again.
type Candidate ¶
type Candidate interface {
Participate(Ctx, LeadershipConfig, AsLeaderFunc) (LeaderSession, error)
}
A Candidate implementation is able to Participate in leadership elections.
type CandidateMock ¶ added in v1.1.3
type CandidateMock struct { ParticipateMock mCandidateMockParticipate // contains filtered or unexported fields }
CandidateMock implements Candidate
func NewCandidateMock ¶ added in v1.1.3
func NewCandidateMock(t minimock.Tester) *CandidateMock
NewCandidateMock returns a mock for Candidate
func (*CandidateMock) MinimockFinish ¶ added in v1.1.3
func (m *CandidateMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*CandidateMock) MinimockParticipateDone ¶ added in v1.1.3
func (m *CandidateMock) MinimockParticipateDone() bool
MinimockParticipateDone returns true if the count of the Participate invocations corresponds the number of defined expectations
func (*CandidateMock) MinimockParticipateInspect ¶ added in v1.1.3
func (m *CandidateMock) MinimockParticipateInspect()
MinimockParticipateInspect logs each unmet expectation
func (*CandidateMock) MinimockWait ¶ added in v1.1.3
func (m *CandidateMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*CandidateMock) Participate ¶ added in v1.1.3
func (mmParticipate *CandidateMock) Participate(c1 Ctx, l1 LeadershipConfig, a1 AsLeaderFunc) (l2 LeaderSession, err error)
Participate implements Candidate
func (*CandidateMock) ParticipateAfterCounter ¶ added in v1.1.3
func (mmParticipate *CandidateMock) ParticipateAfterCounter() uint64
ParticipateAfterCounter returns a count of finished CandidateMock.Participate invocations
func (*CandidateMock) ParticipateBeforeCounter ¶ added in v1.1.3
func (mmParticipate *CandidateMock) ParticipateBeforeCounter() uint64
ParticipateBeforeCounter returns a count of CandidateMock.Participate invocations
type CandidateMockParticipateExpectation ¶ added in v1.1.3
type CandidateMockParticipateExpectation struct { Counter uint64 // contains filtered or unexported fields }
CandidateMockParticipateExpectation specifies expectation struct of the Candidate.Participate
func (*CandidateMockParticipateExpectation) Then ¶ added in v1.1.3
func (e *CandidateMockParticipateExpectation) Then(l2 LeaderSession, err error) *CandidateMock
Then sets up Candidate.Participate return parameters for the expectation previously defined by the When method
type CandidateMockParticipateParams ¶ added in v1.1.3
type CandidateMockParticipateParams struct {
// contains filtered or unexported fields
}
CandidateMockParticipateParams contains parameters of the Candidate.Participate
type CandidateMockParticipateResults ¶ added in v1.1.3
type CandidateMockParticipateResults struct {
// contains filtered or unexported fields
}
CandidateMockParticipateResults contains results of the Candidate.Participate
type Catalog ¶
type Catalog interface { // DataCenters returns the list of all known DCs. The order of the // list of DCs is in estimated round trip distance (i.e. the dcs // furthest away are listed last). // // https://www.consul.io/api/catalog.html#list-datacenters DataCenters(Ctx) ([]string, error) // Nodes will return the list of nodes in dc. // // https://www.consul.io/api/catalog.html#list-nodes Nodes(Ctx, NodesQuery) ([]Node, error) // Node will return detailed meta information associated // a particular node in dc. // // https://www.consul.io/api/catalog.html#list-services-for-node Node(Ctx, string, NodeQuery) (NodeInfo, error) // Services will return a list of names of services // in dc, along with the associated tags for each service. // // https://www.consul.io/api/catalog.html#list-services Services(Ctx, ServicesQuery) (map[string][]string, error) // Service returns detailed meta information about a particular // named service, in dc, which matches all of the listed tags. // // https://www.consul.io/api/catalog.html#list-nodes-for-service Service(Ctx, string, ServiceQuery) ([]Instance, error) // Connect returns the detailed meta information about a particular // consul CONNECT enabled service in a given DC. // // https://www.consul.io/api/catalog.html#list-nodes-for-connect-capable-service Connect(Ctx, string, ServiceQuery) ([]Instance, error) }
A Catalog represents the consul catalog feature.
Note that the register and deregister endpoints are not implemented. Per the consul documentation, it is preferable to make use of the Agent endpoints for service registrations.
type CatalogMock ¶ added in v1.1.3
type CatalogMock struct { ConnectMock mCatalogMockConnect DataCentersMock mCatalogMockDataCenters NodeMock mCatalogMockNode NodesMock mCatalogMockNodes ServiceMock mCatalogMockService ServicesMock mCatalogMockServices // contains filtered or unexported fields }
CatalogMock implements Catalog
func NewCatalogMock ¶ added in v1.1.3
func NewCatalogMock(t minimock.Tester) *CatalogMock
NewCatalogMock returns a mock for Catalog
func (*CatalogMock) Connect ¶ added in v1.1.3
func (mmConnect *CatalogMock) Connect(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
Connect implements Catalog
func (*CatalogMock) ConnectAfterCounter ¶ added in v1.1.3
func (mmConnect *CatalogMock) ConnectAfterCounter() uint64
ConnectAfterCounter returns a count of finished CatalogMock.Connect invocations
func (*CatalogMock) ConnectBeforeCounter ¶ added in v1.1.3
func (mmConnect *CatalogMock) ConnectBeforeCounter() uint64
ConnectBeforeCounter returns a count of CatalogMock.Connect invocations
func (*CatalogMock) DataCenters ¶ added in v1.1.3
func (mmDataCenters *CatalogMock) DataCenters(c1 Ctx) (sa1 []string, err error)
DataCenters implements Catalog
func (*CatalogMock) DataCentersAfterCounter ¶ added in v1.1.3
func (mmDataCenters *CatalogMock) DataCentersAfterCounter() uint64
DataCentersAfterCounter returns a count of finished CatalogMock.DataCenters invocations
func (*CatalogMock) DataCentersBeforeCounter ¶ added in v1.1.3
func (mmDataCenters *CatalogMock) DataCentersBeforeCounter() uint64
DataCentersBeforeCounter returns a count of CatalogMock.DataCenters invocations
func (*CatalogMock) MinimockConnectDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockConnectDone() bool
MinimockConnectDone returns true if the count of the Connect invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockConnectInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockConnectInspect()
MinimockConnectInspect logs each unmet expectation
func (*CatalogMock) MinimockDataCentersDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockDataCentersDone() bool
MinimockDataCentersDone returns true if the count of the DataCenters invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockDataCentersInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockDataCentersInspect()
MinimockDataCentersInspect logs each unmet expectation
func (*CatalogMock) MinimockFinish ¶ added in v1.1.3
func (m *CatalogMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*CatalogMock) MinimockNodeDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockNodeDone() bool
MinimockNodeDone returns true if the count of the Node invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockNodeInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockNodeInspect()
MinimockNodeInspect logs each unmet expectation
func (*CatalogMock) MinimockNodesDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockNodesDone() bool
MinimockNodesDone returns true if the count of the Nodes invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockNodesInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockNodesInspect()
MinimockNodesInspect logs each unmet expectation
func (*CatalogMock) MinimockServiceDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockServiceDone() bool
MinimockServiceDone returns true if the count of the Service invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockServiceInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockServiceInspect()
MinimockServiceInspect logs each unmet expectation
func (*CatalogMock) MinimockServicesDone ¶ added in v1.1.3
func (m *CatalogMock) MinimockServicesDone() bool
MinimockServicesDone returns true if the count of the Services invocations corresponds the number of defined expectations
func (*CatalogMock) MinimockServicesInspect ¶ added in v1.1.3
func (m *CatalogMock) MinimockServicesInspect()
MinimockServicesInspect logs each unmet expectation
func (*CatalogMock) MinimockWait ¶ added in v1.1.3
func (m *CatalogMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*CatalogMock) NodeAfterCounter ¶ added in v1.1.3
func (mmNode *CatalogMock) NodeAfterCounter() uint64
NodeAfterCounter returns a count of finished CatalogMock.Node invocations
func (*CatalogMock) NodeBeforeCounter ¶ added in v1.1.3
func (mmNode *CatalogMock) NodeBeforeCounter() uint64
NodeBeforeCounter returns a count of CatalogMock.Node invocations
func (*CatalogMock) Nodes ¶ added in v1.1.3
func (mmNodes *CatalogMock) Nodes(c1 Ctx, n1 NodesQuery) (na1 []Node, err error)
Nodes implements Catalog
func (*CatalogMock) NodesAfterCounter ¶ added in v1.1.3
func (mmNodes *CatalogMock) NodesAfterCounter() uint64
NodesAfterCounter returns a count of finished CatalogMock.Nodes invocations
func (*CatalogMock) NodesBeforeCounter ¶ added in v1.1.3
func (mmNodes *CatalogMock) NodesBeforeCounter() uint64
NodesBeforeCounter returns a count of CatalogMock.Nodes invocations
func (*CatalogMock) Service ¶ added in v1.1.3
func (mmService *CatalogMock) Service(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
Service implements Catalog
func (*CatalogMock) ServiceAfterCounter ¶ added in v1.1.3
func (mmService *CatalogMock) ServiceAfterCounter() uint64
ServiceAfterCounter returns a count of finished CatalogMock.Service invocations
func (*CatalogMock) ServiceBeforeCounter ¶ added in v1.1.3
func (mmService *CatalogMock) ServiceBeforeCounter() uint64
ServiceBeforeCounter returns a count of CatalogMock.Service invocations
func (*CatalogMock) Services ¶ added in v1.1.3
func (mmServices *CatalogMock) Services(c1 Ctx, s1 ServicesQuery) (m1 map[string][]string, err error)
Services implements Catalog
func (*CatalogMock) ServicesAfterCounter ¶ added in v1.1.3
func (mmServices *CatalogMock) ServicesAfterCounter() uint64
ServicesAfterCounter returns a count of finished CatalogMock.Services invocations
func (*CatalogMock) ServicesBeforeCounter ¶ added in v1.1.3
func (mmServices *CatalogMock) ServicesBeforeCounter() uint64
ServicesBeforeCounter returns a count of CatalogMock.Services invocations
type CatalogMockConnectExpectation ¶ added in v1.1.3
type CatalogMockConnectExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockConnectExpectation specifies expectation struct of the Catalog.Connect
func (*CatalogMockConnectExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockConnectExpectation) Then(ia1 []Instance, err error) *CatalogMock
Then sets up Catalog.Connect return parameters for the expectation previously defined by the When method
type CatalogMockConnectParams ¶ added in v1.1.3
type CatalogMockConnectParams struct {
// contains filtered or unexported fields
}
CatalogMockConnectParams contains parameters of the Catalog.Connect
type CatalogMockConnectResults ¶ added in v1.1.3
type CatalogMockConnectResults struct {
// contains filtered or unexported fields
}
CatalogMockConnectResults contains results of the Catalog.Connect
type CatalogMockDataCentersExpectation ¶ added in v1.1.3
type CatalogMockDataCentersExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockDataCentersExpectation specifies expectation struct of the Catalog.DataCenters
func (*CatalogMockDataCentersExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockDataCentersExpectation) Then(sa1 []string, err error) *CatalogMock
Then sets up Catalog.DataCenters return parameters for the expectation previously defined by the When method
type CatalogMockDataCentersParams ¶ added in v1.1.3
type CatalogMockDataCentersParams struct {
// contains filtered or unexported fields
}
CatalogMockDataCentersParams contains parameters of the Catalog.DataCenters
type CatalogMockDataCentersResults ¶ added in v1.1.3
type CatalogMockDataCentersResults struct {
// contains filtered or unexported fields
}
CatalogMockDataCentersResults contains results of the Catalog.DataCenters
type CatalogMockNodeExpectation ¶ added in v1.1.3
type CatalogMockNodeExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockNodeExpectation specifies expectation struct of the Catalog.Node
func (*CatalogMockNodeExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockNodeExpectation) Then(n2 NodeInfo, err error) *CatalogMock
Then sets up Catalog.Node return parameters for the expectation previously defined by the When method
type CatalogMockNodeParams ¶ added in v1.1.3
type CatalogMockNodeParams struct {
// contains filtered or unexported fields
}
CatalogMockNodeParams contains parameters of the Catalog.Node
type CatalogMockNodeResults ¶ added in v1.1.3
type CatalogMockNodeResults struct {
// contains filtered or unexported fields
}
CatalogMockNodeResults contains results of the Catalog.Node
type CatalogMockNodesExpectation ¶ added in v1.1.3
type CatalogMockNodesExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockNodesExpectation specifies expectation struct of the Catalog.Nodes
func (*CatalogMockNodesExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockNodesExpectation) Then(na1 []Node, err error) *CatalogMock
Then sets up Catalog.Nodes return parameters for the expectation previously defined by the When method
type CatalogMockNodesParams ¶ added in v1.1.3
type CatalogMockNodesParams struct {
// contains filtered or unexported fields
}
CatalogMockNodesParams contains parameters of the Catalog.Nodes
type CatalogMockNodesResults ¶ added in v1.1.3
type CatalogMockNodesResults struct {
// contains filtered or unexported fields
}
CatalogMockNodesResults contains results of the Catalog.Nodes
type CatalogMockServiceExpectation ¶ added in v1.1.3
type CatalogMockServiceExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockServiceExpectation specifies expectation struct of the Catalog.Service
func (*CatalogMockServiceExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockServiceExpectation) Then(ia1 []Instance, err error) *CatalogMock
Then sets up Catalog.Service return parameters for the expectation previously defined by the When method
type CatalogMockServiceParams ¶ added in v1.1.3
type CatalogMockServiceParams struct {
// contains filtered or unexported fields
}
CatalogMockServiceParams contains parameters of the Catalog.Service
type CatalogMockServiceResults ¶ added in v1.1.3
type CatalogMockServiceResults struct {
// contains filtered or unexported fields
}
CatalogMockServiceResults contains results of the Catalog.Service
type CatalogMockServicesExpectation ¶ added in v1.1.3
type CatalogMockServicesExpectation struct { Counter uint64 // contains filtered or unexported fields }
CatalogMockServicesExpectation specifies expectation struct of the Catalog.Services
func (*CatalogMockServicesExpectation) Then ¶ added in v1.1.3
func (e *CatalogMockServicesExpectation) Then(m1 map[string][]string, err error) *CatalogMock
Then sets up Catalog.Services return parameters for the expectation previously defined by the When method
type CatalogMockServicesParams ¶ added in v1.1.3
type CatalogMockServicesParams struct {
// contains filtered or unexported fields
}
CatalogMockServicesParams contains parameters of the Catalog.Services
type CatalogMockServicesResults ¶ added in v1.1.3
type CatalogMockServicesResults struct {
// contains filtered or unexported fields
}
CatalogMockServicesResults contains results of the Catalog.Services
type Client ¶
A Client is used to communicate with consul. The interface is composed of other interfaces, which reflect the different categories of API supported by the consul agent.
func New ¶
func New(opts ClientOptions) Client
New creates a new Client that will use the provided ClientOptions for making requests to a configured consul agent.
type ClientMock ¶ added in v1.1.3
type ClientMock struct { ConnectMock mClientMockConnect CreateSessionMock mClientMockCreateSession DataCentersMock mClientMockDataCenters DeleteMock mClientMockDelete DeleteSessionMock mClientMockDeleteSession ForceLeaveMock mClientMockForceLeave GetMock mClientMockGet JoinMock mClientMockJoin KeysMock mClientMockKeys LeaveMock mClientMockLeave ListSessionsMock mClientMockListSessions MaintenanceModeMock mClientMockMaintenanceMode MembersMock mClientMockMembers MetricsMock mClientMockMetrics NodeMock mClientMockNode NodesMock mClientMockNodes ParticipateMock mClientMockParticipate PutMock mClientMockPut ReadSessionMock mClientMockReadSession RecurseMock mClientMockRecurse ReloadMock mClientMockReload RenewSessionMock mClientMockRenewSession SelfMock mClientMockSelf ServiceMock mClientMockService ServicesMock mClientMockServices SetACLTokenMock mClientMockSetACLToken // contains filtered or unexported fields }
ClientMock implements Client
func NewClientMock ¶ added in v1.1.3
func NewClientMock(t minimock.Tester) *ClientMock
NewClientMock returns a mock for Client
func (*ClientMock) Connect ¶ added in v1.1.3
func (mmConnect *ClientMock) Connect(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
Connect implements Client
func (*ClientMock) ConnectAfterCounter ¶ added in v1.1.3
func (mmConnect *ClientMock) ConnectAfterCounter() uint64
ConnectAfterCounter returns a count of finished ClientMock.Connect invocations
func (*ClientMock) ConnectBeforeCounter ¶ added in v1.1.3
func (mmConnect *ClientMock) ConnectBeforeCounter() uint64
ConnectBeforeCounter returns a count of ClientMock.Connect invocations
func (*ClientMock) CreateSession ¶ added in v1.1.3
func (mmCreateSession *ClientMock) CreateSession(c1 Ctx, s1 SessionConfig) (s2 SessionID, err error)
CreateSession implements Client
func (*ClientMock) CreateSessionAfterCounter ¶ added in v1.1.3
func (mmCreateSession *ClientMock) CreateSessionAfterCounter() uint64
CreateSessionAfterCounter returns a count of finished ClientMock.CreateSession invocations
func (*ClientMock) CreateSessionBeforeCounter ¶ added in v1.1.3
func (mmCreateSession *ClientMock) CreateSessionBeforeCounter() uint64
CreateSessionBeforeCounter returns a count of ClientMock.CreateSession invocations
func (*ClientMock) DataCenters ¶ added in v1.1.3
func (mmDataCenters *ClientMock) DataCenters(c1 Ctx) (sa1 []string, err error)
DataCenters implements Client
func (*ClientMock) DataCentersAfterCounter ¶ added in v1.1.3
func (mmDataCenters *ClientMock) DataCentersAfterCounter() uint64
DataCentersAfterCounter returns a count of finished ClientMock.DataCenters invocations
func (*ClientMock) DataCentersBeforeCounter ¶ added in v1.1.3
func (mmDataCenters *ClientMock) DataCentersBeforeCounter() uint64
DataCentersBeforeCounter returns a count of ClientMock.DataCenters invocations
func (*ClientMock) Delete ¶ added in v1.1.3
func (mmDelete *ClientMock) Delete(c1 Ctx, s1 string, q1 Query) (err error)
Delete implements Client
func (*ClientMock) DeleteAfterCounter ¶ added in v1.1.3
func (mmDelete *ClientMock) DeleteAfterCounter() uint64
DeleteAfterCounter returns a count of finished ClientMock.Delete invocations
func (*ClientMock) DeleteBeforeCounter ¶ added in v1.1.3
func (mmDelete *ClientMock) DeleteBeforeCounter() uint64
DeleteBeforeCounter returns a count of ClientMock.Delete invocations
func (*ClientMock) DeleteSession ¶ added in v1.1.3
func (mmDeleteSession *ClientMock) DeleteSession(c1 Ctx, s1 SessionQuery) (err error)
DeleteSession implements Client
func (*ClientMock) DeleteSessionAfterCounter ¶ added in v1.1.3
func (mmDeleteSession *ClientMock) DeleteSessionAfterCounter() uint64
DeleteSessionAfterCounter returns a count of finished ClientMock.DeleteSession invocations
func (*ClientMock) DeleteSessionBeforeCounter ¶ added in v1.1.3
func (mmDeleteSession *ClientMock) DeleteSessionBeforeCounter() uint64
DeleteSessionBeforeCounter returns a count of ClientMock.DeleteSession invocations
func (*ClientMock) ForceLeave ¶ added in v1.1.3
func (mmForceLeave *ClientMock) ForceLeave(ctx Ctx, node string) (err error)
ForceLeave implements Client
func (*ClientMock) ForceLeaveAfterCounter ¶ added in v1.1.3
func (mmForceLeave *ClientMock) ForceLeaveAfterCounter() uint64
ForceLeaveAfterCounter returns a count of finished ClientMock.ForceLeave invocations
func (*ClientMock) ForceLeaveBeforeCounter ¶ added in v1.1.3
func (mmForceLeave *ClientMock) ForceLeaveBeforeCounter() uint64
ForceLeaveBeforeCounter returns a count of ClientMock.ForceLeave invocations
func (*ClientMock) GetAfterCounter ¶ added in v1.1.3
func (mmGet *ClientMock) GetAfterCounter() uint64
GetAfterCounter returns a count of finished ClientMock.Get invocations
func (*ClientMock) GetBeforeCounter ¶ added in v1.1.3
func (mmGet *ClientMock) GetBeforeCounter() uint64
GetBeforeCounter returns a count of ClientMock.Get invocations
func (*ClientMock) Join ¶ added in v1.1.3
func (mmJoin *ClientMock) Join(ctx Ctx, address string, wan bool) (err error)
Join implements Client
func (*ClientMock) JoinAfterCounter ¶ added in v1.1.3
func (mmJoin *ClientMock) JoinAfterCounter() uint64
JoinAfterCounter returns a count of finished ClientMock.Join invocations
func (*ClientMock) JoinBeforeCounter ¶ added in v1.1.3
func (mmJoin *ClientMock) JoinBeforeCounter() uint64
JoinBeforeCounter returns a count of ClientMock.Join invocations
func (*ClientMock) KeysAfterCounter ¶ added in v1.1.3
func (mmKeys *ClientMock) KeysAfterCounter() uint64
KeysAfterCounter returns a count of finished ClientMock.Keys invocations
func (*ClientMock) KeysBeforeCounter ¶ added in v1.1.3
func (mmKeys *ClientMock) KeysBeforeCounter() uint64
KeysBeforeCounter returns a count of ClientMock.Keys invocations
func (*ClientMock) Leave ¶ added in v1.1.3
func (mmLeave *ClientMock) Leave(ctx Ctx) (err error)
Leave implements Client
func (*ClientMock) LeaveAfterCounter ¶ added in v1.1.3
func (mmLeave *ClientMock) LeaveAfterCounter() uint64
LeaveAfterCounter returns a count of finished ClientMock.Leave invocations
func (*ClientMock) LeaveBeforeCounter ¶ added in v1.1.3
func (mmLeave *ClientMock) LeaveBeforeCounter() uint64
LeaveBeforeCounter returns a count of ClientMock.Leave invocations
func (*ClientMock) ListSessions ¶ added in v1.1.3
func (mmListSessions *ClientMock) ListSessions(ctx Ctx, dc string, node string) (m1 map[SessionID]SessionConfig, err error)
ListSessions implements Client
func (*ClientMock) ListSessionsAfterCounter ¶ added in v1.1.3
func (mmListSessions *ClientMock) ListSessionsAfterCounter() uint64
ListSessionsAfterCounter returns a count of finished ClientMock.ListSessions invocations
func (*ClientMock) ListSessionsBeforeCounter ¶ added in v1.1.3
func (mmListSessions *ClientMock) ListSessionsBeforeCounter() uint64
ListSessionsBeforeCounter returns a count of ClientMock.ListSessions invocations
func (*ClientMock) MaintenanceMode ¶ added in v1.1.3
func (mmMaintenanceMode *ClientMock) MaintenanceMode(ctx Ctx, enabled bool, reason string) (err error)
MaintenanceMode implements Client
func (*ClientMock) MaintenanceModeAfterCounter ¶ added in v1.1.3
func (mmMaintenanceMode *ClientMock) MaintenanceModeAfterCounter() uint64
MaintenanceModeAfterCounter returns a count of finished ClientMock.MaintenanceMode invocations
func (*ClientMock) MaintenanceModeBeforeCounter ¶ added in v1.1.3
func (mmMaintenanceMode *ClientMock) MaintenanceModeBeforeCounter() uint64
MaintenanceModeBeforeCounter returns a count of ClientMock.MaintenanceMode invocations
func (*ClientMock) Members ¶ added in v1.1.3
func (mmMembers *ClientMock) Members(ctx Ctx, wan bool) (aa1 []AgentInfo, err error)
Members implements Client
func (*ClientMock) MembersAfterCounter ¶ added in v1.1.3
func (mmMembers *ClientMock) MembersAfterCounter() uint64
MembersAfterCounter returns a count of finished ClientMock.Members invocations
func (*ClientMock) MembersBeforeCounter ¶ added in v1.1.3
func (mmMembers *ClientMock) MembersBeforeCounter() uint64
MembersBeforeCounter returns a count of ClientMock.Members invocations
func (*ClientMock) Metrics ¶ added in v1.1.3
func (mmMetrics *ClientMock) Metrics(ctx Ctx) (m1 Metrics, err error)
Metrics implements Client
func (*ClientMock) MetricsAfterCounter ¶ added in v1.1.3
func (mmMetrics *ClientMock) MetricsAfterCounter() uint64
MetricsAfterCounter returns a count of finished ClientMock.Metrics invocations
func (*ClientMock) MetricsBeforeCounter ¶ added in v1.1.3
func (mmMetrics *ClientMock) MetricsBeforeCounter() uint64
MetricsBeforeCounter returns a count of ClientMock.Metrics invocations
func (*ClientMock) MinimockConnectDone ¶ added in v1.1.3
func (m *ClientMock) MinimockConnectDone() bool
MinimockConnectDone returns true if the count of the Connect invocations corresponds the number of defined expectations
func (*ClientMock) MinimockConnectInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockConnectInspect()
MinimockConnectInspect logs each unmet expectation
func (*ClientMock) MinimockCreateSessionDone ¶ added in v1.1.3
func (m *ClientMock) MinimockCreateSessionDone() bool
MinimockCreateSessionDone returns true if the count of the CreateSession invocations corresponds the number of defined expectations
func (*ClientMock) MinimockCreateSessionInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockCreateSessionInspect()
MinimockCreateSessionInspect logs each unmet expectation
func (*ClientMock) MinimockDataCentersDone ¶ added in v1.1.3
func (m *ClientMock) MinimockDataCentersDone() bool
MinimockDataCentersDone returns true if the count of the DataCenters invocations corresponds the number of defined expectations
func (*ClientMock) MinimockDataCentersInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockDataCentersInspect()
MinimockDataCentersInspect logs each unmet expectation
func (*ClientMock) MinimockDeleteDone ¶ added in v1.1.3
func (m *ClientMock) MinimockDeleteDone() bool
MinimockDeleteDone returns true if the count of the Delete invocations corresponds the number of defined expectations
func (*ClientMock) MinimockDeleteInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockDeleteInspect()
MinimockDeleteInspect logs each unmet expectation
func (*ClientMock) MinimockDeleteSessionDone ¶ added in v1.1.3
func (m *ClientMock) MinimockDeleteSessionDone() bool
MinimockDeleteSessionDone returns true if the count of the DeleteSession invocations corresponds the number of defined expectations
func (*ClientMock) MinimockDeleteSessionInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockDeleteSessionInspect()
MinimockDeleteSessionInspect logs each unmet expectation
func (*ClientMock) MinimockFinish ¶ added in v1.1.3
func (m *ClientMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*ClientMock) MinimockForceLeaveDone ¶ added in v1.1.3
func (m *ClientMock) MinimockForceLeaveDone() bool
MinimockForceLeaveDone returns true if the count of the ForceLeave invocations corresponds the number of defined expectations
func (*ClientMock) MinimockForceLeaveInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockForceLeaveInspect()
MinimockForceLeaveInspect logs each unmet expectation
func (*ClientMock) MinimockGetDone ¶ added in v1.1.3
func (m *ClientMock) MinimockGetDone() bool
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*ClientMock) MinimockGetInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*ClientMock) MinimockJoinDone ¶ added in v1.1.3
func (m *ClientMock) MinimockJoinDone() bool
MinimockJoinDone returns true if the count of the Join invocations corresponds the number of defined expectations
func (*ClientMock) MinimockJoinInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockJoinInspect()
MinimockJoinInspect logs each unmet expectation
func (*ClientMock) MinimockKeysDone ¶ added in v1.1.3
func (m *ClientMock) MinimockKeysDone() bool
MinimockKeysDone returns true if the count of the Keys invocations corresponds the number of defined expectations
func (*ClientMock) MinimockKeysInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockKeysInspect()
MinimockKeysInspect logs each unmet expectation
func (*ClientMock) MinimockLeaveDone ¶ added in v1.1.3
func (m *ClientMock) MinimockLeaveDone() bool
MinimockLeaveDone returns true if the count of the Leave invocations corresponds the number of defined expectations
func (*ClientMock) MinimockLeaveInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockLeaveInspect()
MinimockLeaveInspect logs each unmet expectation
func (*ClientMock) MinimockListSessionsDone ¶ added in v1.1.3
func (m *ClientMock) MinimockListSessionsDone() bool
MinimockListSessionsDone returns true if the count of the ListSessions invocations corresponds the number of defined expectations
func (*ClientMock) MinimockListSessionsInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockListSessionsInspect()
MinimockListSessionsInspect logs each unmet expectation
func (*ClientMock) MinimockMaintenanceModeDone ¶ added in v1.1.3
func (m *ClientMock) MinimockMaintenanceModeDone() bool
MinimockMaintenanceModeDone returns true if the count of the MaintenanceMode invocations corresponds the number of defined expectations
func (*ClientMock) MinimockMaintenanceModeInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockMaintenanceModeInspect()
MinimockMaintenanceModeInspect logs each unmet expectation
func (*ClientMock) MinimockMembersDone ¶ added in v1.1.3
func (m *ClientMock) MinimockMembersDone() bool
MinimockMembersDone returns true if the count of the Members invocations corresponds the number of defined expectations
func (*ClientMock) MinimockMembersInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockMembersInspect()
MinimockMembersInspect logs each unmet expectation
func (*ClientMock) MinimockMetricsDone ¶ added in v1.1.3
func (m *ClientMock) MinimockMetricsDone() bool
MinimockMetricsDone returns true if the count of the Metrics invocations corresponds the number of defined expectations
func (*ClientMock) MinimockMetricsInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockMetricsInspect()
MinimockMetricsInspect logs each unmet expectation
func (*ClientMock) MinimockNodeDone ¶ added in v1.1.3
func (m *ClientMock) MinimockNodeDone() bool
MinimockNodeDone returns true if the count of the Node invocations corresponds the number of defined expectations
func (*ClientMock) MinimockNodeInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockNodeInspect()
MinimockNodeInspect logs each unmet expectation
func (*ClientMock) MinimockNodesDone ¶ added in v1.1.3
func (m *ClientMock) MinimockNodesDone() bool
MinimockNodesDone returns true if the count of the Nodes invocations corresponds the number of defined expectations
func (*ClientMock) MinimockNodesInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockNodesInspect()
MinimockNodesInspect logs each unmet expectation
func (*ClientMock) MinimockParticipateDone ¶ added in v1.1.3
func (m *ClientMock) MinimockParticipateDone() bool
MinimockParticipateDone returns true if the count of the Participate invocations corresponds the number of defined expectations
func (*ClientMock) MinimockParticipateInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockParticipateInspect()
MinimockParticipateInspect logs each unmet expectation
func (*ClientMock) MinimockPutDone ¶ added in v1.1.3
func (m *ClientMock) MinimockPutDone() bool
MinimockPutDone returns true if the count of the Put invocations corresponds the number of defined expectations
func (*ClientMock) MinimockPutInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockPutInspect()
MinimockPutInspect logs each unmet expectation
func (*ClientMock) MinimockReadSessionDone ¶ added in v1.1.3
func (m *ClientMock) MinimockReadSessionDone() bool
MinimockReadSessionDone returns true if the count of the ReadSession invocations corresponds the number of defined expectations
func (*ClientMock) MinimockReadSessionInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockReadSessionInspect()
MinimockReadSessionInspect logs each unmet expectation
func (*ClientMock) MinimockRecurseDone ¶ added in v1.1.3
func (m *ClientMock) MinimockRecurseDone() bool
MinimockRecurseDone returns true if the count of the Recurse invocations corresponds the number of defined expectations
func (*ClientMock) MinimockRecurseInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockRecurseInspect()
MinimockRecurseInspect logs each unmet expectation
func (*ClientMock) MinimockReloadDone ¶ added in v1.1.3
func (m *ClientMock) MinimockReloadDone() bool
MinimockReloadDone returns true if the count of the Reload invocations corresponds the number of defined expectations
func (*ClientMock) MinimockReloadInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockReloadInspect()
MinimockReloadInspect logs each unmet expectation
func (*ClientMock) MinimockRenewSessionDone ¶ added in v1.1.3
func (m *ClientMock) MinimockRenewSessionDone() bool
MinimockRenewSessionDone returns true if the count of the RenewSession invocations corresponds the number of defined expectations
func (*ClientMock) MinimockRenewSessionInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockRenewSessionInspect()
MinimockRenewSessionInspect logs each unmet expectation
func (*ClientMock) MinimockSelfDone ¶ added in v1.1.3
func (m *ClientMock) MinimockSelfDone() bool
MinimockSelfDone returns true if the count of the Self invocations corresponds the number of defined expectations
func (*ClientMock) MinimockSelfInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockSelfInspect()
MinimockSelfInspect logs each unmet expectation
func (*ClientMock) MinimockServiceDone ¶ added in v1.1.3
func (m *ClientMock) MinimockServiceDone() bool
MinimockServiceDone returns true if the count of the Service invocations corresponds the number of defined expectations
func (*ClientMock) MinimockServiceInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockServiceInspect()
MinimockServiceInspect logs each unmet expectation
func (*ClientMock) MinimockServicesDone ¶ added in v1.1.3
func (m *ClientMock) MinimockServicesDone() bool
MinimockServicesDone returns true if the count of the Services invocations corresponds the number of defined expectations
func (*ClientMock) MinimockServicesInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockServicesInspect()
MinimockServicesInspect logs each unmet expectation
func (*ClientMock) MinimockSetACLTokenDone ¶ added in v1.1.3
func (m *ClientMock) MinimockSetACLTokenDone() bool
MinimockSetACLTokenDone returns true if the count of the SetACLToken invocations corresponds the number of defined expectations
func (*ClientMock) MinimockSetACLTokenInspect ¶ added in v1.1.3
func (m *ClientMock) MinimockSetACLTokenInspect()
MinimockSetACLTokenInspect logs each unmet expectation
func (*ClientMock) MinimockWait ¶ added in v1.1.3
func (m *ClientMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*ClientMock) NodeAfterCounter ¶ added in v1.1.3
func (mmNode *ClientMock) NodeAfterCounter() uint64
NodeAfterCounter returns a count of finished ClientMock.Node invocations
func (*ClientMock) NodeBeforeCounter ¶ added in v1.1.3
func (mmNode *ClientMock) NodeBeforeCounter() uint64
NodeBeforeCounter returns a count of ClientMock.Node invocations
func (*ClientMock) Nodes ¶ added in v1.1.3
func (mmNodes *ClientMock) Nodes(c1 Ctx, n1 NodesQuery) (na1 []Node, err error)
Nodes implements Client
func (*ClientMock) NodesAfterCounter ¶ added in v1.1.3
func (mmNodes *ClientMock) NodesAfterCounter() uint64
NodesAfterCounter returns a count of finished ClientMock.Nodes invocations
func (*ClientMock) NodesBeforeCounter ¶ added in v1.1.3
func (mmNodes *ClientMock) NodesBeforeCounter() uint64
NodesBeforeCounter returns a count of ClientMock.Nodes invocations
func (*ClientMock) Participate ¶ added in v1.1.3
func (mmParticipate *ClientMock) Participate(c1 Ctx, l1 LeadershipConfig, a1 AsLeaderFunc) (l2 LeaderSession, err error)
Participate implements Client
func (*ClientMock) ParticipateAfterCounter ¶ added in v1.1.3
func (mmParticipate *ClientMock) ParticipateAfterCounter() uint64
ParticipateAfterCounter returns a count of finished ClientMock.Participate invocations
func (*ClientMock) ParticipateBeforeCounter ¶ added in v1.1.3
func (mmParticipate *ClientMock) ParticipateBeforeCounter() uint64
ParticipateBeforeCounter returns a count of ClientMock.Participate invocations
func (*ClientMock) PutAfterCounter ¶ added in v1.1.3
func (mmPut *ClientMock) PutAfterCounter() uint64
PutAfterCounter returns a count of finished ClientMock.Put invocations
func (*ClientMock) PutBeforeCounter ¶ added in v1.1.3
func (mmPut *ClientMock) PutBeforeCounter() uint64
PutBeforeCounter returns a count of ClientMock.Put invocations
func (*ClientMock) ReadSession ¶ added in v1.1.3
func (mmReadSession *ClientMock) ReadSession(c1 Ctx, s1 SessionQuery) (s2 SessionConfig, err error)
ReadSession implements Client
func (*ClientMock) ReadSessionAfterCounter ¶ added in v1.1.3
func (mmReadSession *ClientMock) ReadSessionAfterCounter() uint64
ReadSessionAfterCounter returns a count of finished ClientMock.ReadSession invocations
func (*ClientMock) ReadSessionBeforeCounter ¶ added in v1.1.3
func (mmReadSession *ClientMock) ReadSessionBeforeCounter() uint64
ReadSessionBeforeCounter returns a count of ClientMock.ReadSession invocations
func (*ClientMock) RecurseAfterCounter ¶ added in v1.1.3
func (mmRecurse *ClientMock) RecurseAfterCounter() uint64
RecurseAfterCounter returns a count of finished ClientMock.Recurse invocations
func (*ClientMock) RecurseBeforeCounter ¶ added in v1.1.3
func (mmRecurse *ClientMock) RecurseBeforeCounter() uint64
RecurseBeforeCounter returns a count of ClientMock.Recurse invocations
func (*ClientMock) Reload ¶ added in v1.1.3
func (mmReload *ClientMock) Reload(ctx Ctx) (err error)
Reload implements Client
func (*ClientMock) ReloadAfterCounter ¶ added in v1.1.3
func (mmReload *ClientMock) ReloadAfterCounter() uint64
ReloadAfterCounter returns a count of finished ClientMock.Reload invocations
func (*ClientMock) ReloadBeforeCounter ¶ added in v1.1.3
func (mmReload *ClientMock) ReloadBeforeCounter() uint64
ReloadBeforeCounter returns a count of ClientMock.Reload invocations
func (*ClientMock) RenewSession ¶ added in v1.1.3
func (mmRenewSession *ClientMock) RenewSession(c1 Ctx, s1 SessionQuery) (d1 time.Duration, err error)
RenewSession implements Client
func (*ClientMock) RenewSessionAfterCounter ¶ added in v1.1.3
func (mmRenewSession *ClientMock) RenewSessionAfterCounter() uint64
RenewSessionAfterCounter returns a count of finished ClientMock.RenewSession invocations
func (*ClientMock) RenewSessionBeforeCounter ¶ added in v1.1.3
func (mmRenewSession *ClientMock) RenewSessionBeforeCounter() uint64
RenewSessionBeforeCounter returns a count of ClientMock.RenewSession invocations
func (*ClientMock) Self ¶ added in v1.1.3
func (mmSelf *ClientMock) Self(ctx Ctx) (a1 AgentInfo, err error)
Self implements Client
func (*ClientMock) SelfAfterCounter ¶ added in v1.1.3
func (mmSelf *ClientMock) SelfAfterCounter() uint64
SelfAfterCounter returns a count of finished ClientMock.Self invocations
func (*ClientMock) SelfBeforeCounter ¶ added in v1.1.3
func (mmSelf *ClientMock) SelfBeforeCounter() uint64
SelfBeforeCounter returns a count of ClientMock.Self invocations
func (*ClientMock) Service ¶ added in v1.1.3
func (mmService *ClientMock) Service(c1 Ctx, s1 string, s2 ServiceQuery) (ia1 []Instance, err error)
Service implements Client
func (*ClientMock) ServiceAfterCounter ¶ added in v1.1.3
func (mmService *ClientMock) ServiceAfterCounter() uint64
ServiceAfterCounter returns a count of finished ClientMock.Service invocations
func (*ClientMock) ServiceBeforeCounter ¶ added in v1.1.3
func (mmService *ClientMock) ServiceBeforeCounter() uint64
ServiceBeforeCounter returns a count of ClientMock.Service invocations
func (*ClientMock) Services ¶ added in v1.1.3
func (mmServices *ClientMock) Services(c1 Ctx, s1 ServicesQuery) (m1 map[string][]string, err error)
Services implements Client
func (*ClientMock) ServicesAfterCounter ¶ added in v1.1.3
func (mmServices *ClientMock) ServicesAfterCounter() uint64
ServicesAfterCounter returns a count of finished ClientMock.Services invocations
func (*ClientMock) ServicesBeforeCounter ¶ added in v1.1.3
func (mmServices *ClientMock) ServicesBeforeCounter() uint64
ServicesBeforeCounter returns a count of ClientMock.Services invocations
func (*ClientMock) SetACLToken ¶ added in v1.1.3
func (mmSetACLToken *ClientMock) SetACLToken(ctx Ctx, kind string, token string) (err error)
SetACLToken implements Client
func (*ClientMock) SetACLTokenAfterCounter ¶ added in v1.1.3
func (mmSetACLToken *ClientMock) SetACLTokenAfterCounter() uint64
SetACLTokenAfterCounter returns a count of finished ClientMock.SetACLToken invocations
func (*ClientMock) SetACLTokenBeforeCounter ¶ added in v1.1.3
func (mmSetACLToken *ClientMock) SetACLTokenBeforeCounter() uint64
SetACLTokenBeforeCounter returns a count of ClientMock.SetACLToken invocations
type ClientMockConnectExpectation ¶ added in v1.1.3
type ClientMockConnectExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockConnectExpectation specifies expectation struct of the Client.Connect
func (*ClientMockConnectExpectation) Then ¶ added in v1.1.3
func (e *ClientMockConnectExpectation) Then(ia1 []Instance, err error) *ClientMock
Then sets up Client.Connect return parameters for the expectation previously defined by the When method
type ClientMockConnectParams ¶ added in v1.1.3
type ClientMockConnectParams struct {
// contains filtered or unexported fields
}
ClientMockConnectParams contains parameters of the Client.Connect
type ClientMockConnectResults ¶ added in v1.1.3
type ClientMockConnectResults struct {
// contains filtered or unexported fields
}
ClientMockConnectResults contains results of the Client.Connect
type ClientMockCreateSessionExpectation ¶ added in v1.1.3
type ClientMockCreateSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockCreateSessionExpectation specifies expectation struct of the Client.CreateSession
func (*ClientMockCreateSessionExpectation) Then ¶ added in v1.1.3
func (e *ClientMockCreateSessionExpectation) Then(s2 SessionID, err error) *ClientMock
Then sets up Client.CreateSession return parameters for the expectation previously defined by the When method
type ClientMockCreateSessionParams ¶ added in v1.1.3
type ClientMockCreateSessionParams struct {
// contains filtered or unexported fields
}
ClientMockCreateSessionParams contains parameters of the Client.CreateSession
type ClientMockCreateSessionResults ¶ added in v1.1.3
type ClientMockCreateSessionResults struct {
// contains filtered or unexported fields
}
ClientMockCreateSessionResults contains results of the Client.CreateSession
type ClientMockDataCentersExpectation ¶ added in v1.1.3
type ClientMockDataCentersExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockDataCentersExpectation specifies expectation struct of the Client.DataCenters
func (*ClientMockDataCentersExpectation) Then ¶ added in v1.1.3
func (e *ClientMockDataCentersExpectation) Then(sa1 []string, err error) *ClientMock
Then sets up Client.DataCenters return parameters for the expectation previously defined by the When method
type ClientMockDataCentersParams ¶ added in v1.1.3
type ClientMockDataCentersParams struct {
// contains filtered or unexported fields
}
ClientMockDataCentersParams contains parameters of the Client.DataCenters
type ClientMockDataCentersResults ¶ added in v1.1.3
type ClientMockDataCentersResults struct {
// contains filtered or unexported fields
}
ClientMockDataCentersResults contains results of the Client.DataCenters
type ClientMockDeleteExpectation ¶ added in v1.1.3
type ClientMockDeleteExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockDeleteExpectation specifies expectation struct of the Client.Delete
func (*ClientMockDeleteExpectation) Then ¶ added in v1.1.3
func (e *ClientMockDeleteExpectation) Then(err error) *ClientMock
Then sets up Client.Delete return parameters for the expectation previously defined by the When method
type ClientMockDeleteParams ¶ added in v1.1.3
type ClientMockDeleteParams struct {
// contains filtered or unexported fields
}
ClientMockDeleteParams contains parameters of the Client.Delete
type ClientMockDeleteResults ¶ added in v1.1.3
type ClientMockDeleteResults struct {
// contains filtered or unexported fields
}
ClientMockDeleteResults contains results of the Client.Delete
type ClientMockDeleteSessionExpectation ¶ added in v1.1.3
type ClientMockDeleteSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockDeleteSessionExpectation specifies expectation struct of the Client.DeleteSession
func (*ClientMockDeleteSessionExpectation) Then ¶ added in v1.1.3
func (e *ClientMockDeleteSessionExpectation) Then(err error) *ClientMock
Then sets up Client.DeleteSession return parameters for the expectation previously defined by the When method
type ClientMockDeleteSessionParams ¶ added in v1.1.3
type ClientMockDeleteSessionParams struct {
// contains filtered or unexported fields
}
ClientMockDeleteSessionParams contains parameters of the Client.DeleteSession
type ClientMockDeleteSessionResults ¶ added in v1.1.3
type ClientMockDeleteSessionResults struct {
// contains filtered or unexported fields
}
ClientMockDeleteSessionResults contains results of the Client.DeleteSession
type ClientMockForceLeaveExpectation ¶ added in v1.1.3
type ClientMockForceLeaveExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockForceLeaveExpectation specifies expectation struct of the Client.ForceLeave
func (*ClientMockForceLeaveExpectation) Then ¶ added in v1.1.3
func (e *ClientMockForceLeaveExpectation) Then(err error) *ClientMock
Then sets up Client.ForceLeave return parameters for the expectation previously defined by the When method
type ClientMockForceLeaveParams ¶ added in v1.1.3
type ClientMockForceLeaveParams struct {
// contains filtered or unexported fields
}
ClientMockForceLeaveParams contains parameters of the Client.ForceLeave
type ClientMockForceLeaveResults ¶ added in v1.1.3
type ClientMockForceLeaveResults struct {
// contains filtered or unexported fields
}
ClientMockForceLeaveResults contains results of the Client.ForceLeave
type ClientMockGetExpectation ¶ added in v1.1.3
type ClientMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockGetExpectation specifies expectation struct of the Client.Get
func (*ClientMockGetExpectation) Then ¶ added in v1.1.3
func (e *ClientMockGetExpectation) Then(s2 string, err error) *ClientMock
Then sets up Client.Get return parameters for the expectation previously defined by the When method
type ClientMockGetParams ¶ added in v1.1.3
type ClientMockGetParams struct {
// contains filtered or unexported fields
}
ClientMockGetParams contains parameters of the Client.Get
type ClientMockGetResults ¶ added in v1.1.3
type ClientMockGetResults struct {
// contains filtered or unexported fields
}
ClientMockGetResults contains results of the Client.Get
type ClientMockJoinExpectation ¶ added in v1.1.3
type ClientMockJoinExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockJoinExpectation specifies expectation struct of the Client.Join
func (*ClientMockJoinExpectation) Then ¶ added in v1.1.3
func (e *ClientMockJoinExpectation) Then(err error) *ClientMock
Then sets up Client.Join return parameters for the expectation previously defined by the When method
type ClientMockJoinParams ¶ added in v1.1.3
type ClientMockJoinParams struct {
// contains filtered or unexported fields
}
ClientMockJoinParams contains parameters of the Client.Join
type ClientMockJoinResults ¶ added in v1.1.3
type ClientMockJoinResults struct {
// contains filtered or unexported fields
}
ClientMockJoinResults contains results of the Client.Join
type ClientMockKeysExpectation ¶ added in v1.1.3
type ClientMockKeysExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockKeysExpectation specifies expectation struct of the Client.Keys
func (*ClientMockKeysExpectation) Then ¶ added in v1.1.3
func (e *ClientMockKeysExpectation) Then(sa1 []string, err error) *ClientMock
Then sets up Client.Keys return parameters for the expectation previously defined by the When method
type ClientMockKeysParams ¶ added in v1.1.3
type ClientMockKeysParams struct {
// contains filtered or unexported fields
}
ClientMockKeysParams contains parameters of the Client.Keys
type ClientMockKeysResults ¶ added in v1.1.3
type ClientMockKeysResults struct {
// contains filtered or unexported fields
}
ClientMockKeysResults contains results of the Client.Keys
type ClientMockLeaveExpectation ¶ added in v1.1.3
type ClientMockLeaveExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockLeaveExpectation specifies expectation struct of the Client.Leave
func (*ClientMockLeaveExpectation) Then ¶ added in v1.1.3
func (e *ClientMockLeaveExpectation) Then(err error) *ClientMock
Then sets up Client.Leave return parameters for the expectation previously defined by the When method
type ClientMockLeaveParams ¶ added in v1.1.3
type ClientMockLeaveParams struct {
// contains filtered or unexported fields
}
ClientMockLeaveParams contains parameters of the Client.Leave
type ClientMockLeaveResults ¶ added in v1.1.3
type ClientMockLeaveResults struct {
// contains filtered or unexported fields
}
ClientMockLeaveResults contains results of the Client.Leave
type ClientMockListSessionsExpectation ¶ added in v1.1.3
type ClientMockListSessionsExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockListSessionsExpectation specifies expectation struct of the Client.ListSessions
func (*ClientMockListSessionsExpectation) Then ¶ added in v1.1.3
func (e *ClientMockListSessionsExpectation) Then(m1 map[SessionID]SessionConfig, err error) *ClientMock
Then sets up Client.ListSessions return parameters for the expectation previously defined by the When method
type ClientMockListSessionsParams ¶ added in v1.1.3
type ClientMockListSessionsParams struct {
// contains filtered or unexported fields
}
ClientMockListSessionsParams contains parameters of the Client.ListSessions
type ClientMockListSessionsResults ¶ added in v1.1.3
type ClientMockListSessionsResults struct {
// contains filtered or unexported fields
}
ClientMockListSessionsResults contains results of the Client.ListSessions
type ClientMockMaintenanceModeExpectation ¶ added in v1.1.3
type ClientMockMaintenanceModeExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockMaintenanceModeExpectation specifies expectation struct of the Client.MaintenanceMode
func (*ClientMockMaintenanceModeExpectation) Then ¶ added in v1.1.3
func (e *ClientMockMaintenanceModeExpectation) Then(err error) *ClientMock
Then sets up Client.MaintenanceMode return parameters for the expectation previously defined by the When method
type ClientMockMaintenanceModeParams ¶ added in v1.1.3
type ClientMockMaintenanceModeParams struct {
// contains filtered or unexported fields
}
ClientMockMaintenanceModeParams contains parameters of the Client.MaintenanceMode
type ClientMockMaintenanceModeResults ¶ added in v1.1.3
type ClientMockMaintenanceModeResults struct {
// contains filtered or unexported fields
}
ClientMockMaintenanceModeResults contains results of the Client.MaintenanceMode
type ClientMockMembersExpectation ¶ added in v1.1.3
type ClientMockMembersExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockMembersExpectation specifies expectation struct of the Client.Members
func (*ClientMockMembersExpectation) Then ¶ added in v1.1.3
func (e *ClientMockMembersExpectation) Then(aa1 []AgentInfo, err error) *ClientMock
Then sets up Client.Members return parameters for the expectation previously defined by the When method
type ClientMockMembersParams ¶ added in v1.1.3
type ClientMockMembersParams struct {
// contains filtered or unexported fields
}
ClientMockMembersParams contains parameters of the Client.Members
type ClientMockMembersResults ¶ added in v1.1.3
type ClientMockMembersResults struct {
// contains filtered or unexported fields
}
ClientMockMembersResults contains results of the Client.Members
type ClientMockMetricsExpectation ¶ added in v1.1.3
type ClientMockMetricsExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockMetricsExpectation specifies expectation struct of the Client.Metrics
func (*ClientMockMetricsExpectation) Then ¶ added in v1.1.3
func (e *ClientMockMetricsExpectation) Then(m1 Metrics, err error) *ClientMock
Then sets up Client.Metrics return parameters for the expectation previously defined by the When method
type ClientMockMetricsParams ¶ added in v1.1.3
type ClientMockMetricsParams struct {
// contains filtered or unexported fields
}
ClientMockMetricsParams contains parameters of the Client.Metrics
type ClientMockMetricsResults ¶ added in v1.1.3
type ClientMockMetricsResults struct {
// contains filtered or unexported fields
}
ClientMockMetricsResults contains results of the Client.Metrics
type ClientMockNodeExpectation ¶ added in v1.1.3
type ClientMockNodeExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockNodeExpectation specifies expectation struct of the Client.Node
func (*ClientMockNodeExpectation) Then ¶ added in v1.1.3
func (e *ClientMockNodeExpectation) Then(n2 NodeInfo, err error) *ClientMock
Then sets up Client.Node return parameters for the expectation previously defined by the When method
type ClientMockNodeParams ¶ added in v1.1.3
type ClientMockNodeParams struct {
// contains filtered or unexported fields
}
ClientMockNodeParams contains parameters of the Client.Node
type ClientMockNodeResults ¶ added in v1.1.3
type ClientMockNodeResults struct {
// contains filtered or unexported fields
}
ClientMockNodeResults contains results of the Client.Node
type ClientMockNodesExpectation ¶ added in v1.1.3
type ClientMockNodesExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockNodesExpectation specifies expectation struct of the Client.Nodes
func (*ClientMockNodesExpectation) Then ¶ added in v1.1.3
func (e *ClientMockNodesExpectation) Then(na1 []Node, err error) *ClientMock
Then sets up Client.Nodes return parameters for the expectation previously defined by the When method
type ClientMockNodesParams ¶ added in v1.1.3
type ClientMockNodesParams struct {
// contains filtered or unexported fields
}
ClientMockNodesParams contains parameters of the Client.Nodes
type ClientMockNodesResults ¶ added in v1.1.3
type ClientMockNodesResults struct {
// contains filtered or unexported fields
}
ClientMockNodesResults contains results of the Client.Nodes
type ClientMockParticipateExpectation ¶ added in v1.1.3
type ClientMockParticipateExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockParticipateExpectation specifies expectation struct of the Client.Participate
func (*ClientMockParticipateExpectation) Then ¶ added in v1.1.3
func (e *ClientMockParticipateExpectation) Then(l2 LeaderSession, err error) *ClientMock
Then sets up Client.Participate return parameters for the expectation previously defined by the When method
type ClientMockParticipateParams ¶ added in v1.1.3
type ClientMockParticipateParams struct {
// contains filtered or unexported fields
}
ClientMockParticipateParams contains parameters of the Client.Participate
type ClientMockParticipateResults ¶ added in v1.1.3
type ClientMockParticipateResults struct {
// contains filtered or unexported fields
}
ClientMockParticipateResults contains results of the Client.Participate
type ClientMockPutExpectation ¶ added in v1.1.3
type ClientMockPutExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockPutExpectation specifies expectation struct of the Client.Put
func (*ClientMockPutExpectation) Then ¶ added in v1.1.3
func (e *ClientMockPutExpectation) Then(err error) *ClientMock
Then sets up Client.Put return parameters for the expectation previously defined by the When method
type ClientMockPutParams ¶ added in v1.1.3
type ClientMockPutParams struct {
// contains filtered or unexported fields
}
ClientMockPutParams contains parameters of the Client.Put
type ClientMockPutResults ¶ added in v1.1.3
type ClientMockPutResults struct {
// contains filtered or unexported fields
}
ClientMockPutResults contains results of the Client.Put
type ClientMockReadSessionExpectation ¶ added in v1.1.3
type ClientMockReadSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockReadSessionExpectation specifies expectation struct of the Client.ReadSession
func (*ClientMockReadSessionExpectation) Then ¶ added in v1.1.3
func (e *ClientMockReadSessionExpectation) Then(s2 SessionConfig, err error) *ClientMock
Then sets up Client.ReadSession return parameters for the expectation previously defined by the When method
type ClientMockReadSessionParams ¶ added in v1.1.3
type ClientMockReadSessionParams struct {
// contains filtered or unexported fields
}
ClientMockReadSessionParams contains parameters of the Client.ReadSession
type ClientMockReadSessionResults ¶ added in v1.1.3
type ClientMockReadSessionResults struct {
// contains filtered or unexported fields
}
ClientMockReadSessionResults contains results of the Client.ReadSession
type ClientMockRecurseExpectation ¶ added in v1.1.3
type ClientMockRecurseExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockRecurseExpectation specifies expectation struct of the Client.Recurse
func (*ClientMockRecurseExpectation) Then ¶ added in v1.1.3
func (e *ClientMockRecurseExpectation) Then(pa1 []Pair, err error) *ClientMock
Then sets up Client.Recurse return parameters for the expectation previously defined by the When method
type ClientMockRecurseParams ¶ added in v1.1.3
type ClientMockRecurseParams struct {
// contains filtered or unexported fields
}
ClientMockRecurseParams contains parameters of the Client.Recurse
type ClientMockRecurseResults ¶ added in v1.1.3
type ClientMockRecurseResults struct {
// contains filtered or unexported fields
}
ClientMockRecurseResults contains results of the Client.Recurse
type ClientMockReloadExpectation ¶ added in v1.1.3
type ClientMockReloadExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockReloadExpectation specifies expectation struct of the Client.Reload
func (*ClientMockReloadExpectation) Then ¶ added in v1.1.3
func (e *ClientMockReloadExpectation) Then(err error) *ClientMock
Then sets up Client.Reload return parameters for the expectation previously defined by the When method
type ClientMockReloadParams ¶ added in v1.1.3
type ClientMockReloadParams struct {
// contains filtered or unexported fields
}
ClientMockReloadParams contains parameters of the Client.Reload
type ClientMockReloadResults ¶ added in v1.1.3
type ClientMockReloadResults struct {
// contains filtered or unexported fields
}
ClientMockReloadResults contains results of the Client.Reload
type ClientMockRenewSessionExpectation ¶ added in v1.1.3
type ClientMockRenewSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockRenewSessionExpectation specifies expectation struct of the Client.RenewSession
func (*ClientMockRenewSessionExpectation) Then ¶ added in v1.1.3
func (e *ClientMockRenewSessionExpectation) Then(d1 time.Duration, err error) *ClientMock
Then sets up Client.RenewSession return parameters for the expectation previously defined by the When method
type ClientMockRenewSessionParams ¶ added in v1.1.3
type ClientMockRenewSessionParams struct {
// contains filtered or unexported fields
}
ClientMockRenewSessionParams contains parameters of the Client.RenewSession
type ClientMockRenewSessionResults ¶ added in v1.1.3
type ClientMockRenewSessionResults struct {
// contains filtered or unexported fields
}
ClientMockRenewSessionResults contains results of the Client.RenewSession
type ClientMockSelfExpectation ¶ added in v1.1.3
type ClientMockSelfExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockSelfExpectation specifies expectation struct of the Client.Self
func (*ClientMockSelfExpectation) Then ¶ added in v1.1.3
func (e *ClientMockSelfExpectation) Then(a1 AgentInfo, err error) *ClientMock
Then sets up Client.Self return parameters for the expectation previously defined by the When method
type ClientMockSelfParams ¶ added in v1.1.3
type ClientMockSelfParams struct {
// contains filtered or unexported fields
}
ClientMockSelfParams contains parameters of the Client.Self
type ClientMockSelfResults ¶ added in v1.1.3
type ClientMockSelfResults struct {
// contains filtered or unexported fields
}
ClientMockSelfResults contains results of the Client.Self
type ClientMockServiceExpectation ¶ added in v1.1.3
type ClientMockServiceExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockServiceExpectation specifies expectation struct of the Client.Service
func (*ClientMockServiceExpectation) Then ¶ added in v1.1.3
func (e *ClientMockServiceExpectation) Then(ia1 []Instance, err error) *ClientMock
Then sets up Client.Service return parameters for the expectation previously defined by the When method
type ClientMockServiceParams ¶ added in v1.1.3
type ClientMockServiceParams struct {
// contains filtered or unexported fields
}
ClientMockServiceParams contains parameters of the Client.Service
type ClientMockServiceResults ¶ added in v1.1.3
type ClientMockServiceResults struct {
// contains filtered or unexported fields
}
ClientMockServiceResults contains results of the Client.Service
type ClientMockServicesExpectation ¶ added in v1.1.3
type ClientMockServicesExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockServicesExpectation specifies expectation struct of the Client.Services
func (*ClientMockServicesExpectation) Then ¶ added in v1.1.3
func (e *ClientMockServicesExpectation) Then(m1 map[string][]string, err error) *ClientMock
Then sets up Client.Services return parameters for the expectation previously defined by the When method
type ClientMockServicesParams ¶ added in v1.1.3
type ClientMockServicesParams struct {
// contains filtered or unexported fields
}
ClientMockServicesParams contains parameters of the Client.Services
type ClientMockServicesResults ¶ added in v1.1.3
type ClientMockServicesResults struct {
// contains filtered or unexported fields
}
ClientMockServicesResults contains results of the Client.Services
type ClientMockSetACLTokenExpectation ¶ added in v1.1.3
type ClientMockSetACLTokenExpectation struct { Counter uint64 // contains filtered or unexported fields }
ClientMockSetACLTokenExpectation specifies expectation struct of the Client.SetACLToken
func (*ClientMockSetACLTokenExpectation) Then ¶ added in v1.1.3
func (e *ClientMockSetACLTokenExpectation) Then(err error) *ClientMock
Then sets up Client.SetACLToken return parameters for the expectation previously defined by the When method
type ClientMockSetACLTokenParams ¶ added in v1.1.3
type ClientMockSetACLTokenParams struct {
// contains filtered or unexported fields
}
ClientMockSetACLTokenParams contains parameters of the Client.SetACLToken
type ClientMockSetACLTokenResults ¶ added in v1.1.3
type ClientMockSetACLTokenResults struct {
// contains filtered or unexported fields
}
ClientMockSetACLTokenResults contains results of the Client.SetACLToken
type ClientOptions ¶
type ClientOptions struct { // Address (optional) of the consul agent to communicate with. This value // will default to http://localhost:8500 if left unset. This is likely // the desired value, as consul is designed to run with an agent on // every node. Address string // Token (optional) will be used to authenticate requests to consul. Token string // HTTPClient (optional) is the underlying HTTP client to use for making // requests to consul agents and servers. If not set, a default HTTP client // is used with a default timeout of 10 seconds, and will keep connections // open. HTTPClient *http.Client // Logger may be optionally configured as an output for trace level logging // produced internally by the Client. This can be helpful for debugging logic // errors in client code. Logger loggy.Logger }
ClientOptions are used to configure options of a client upon creation.
type Instance ¶ added in v1.1.3
type Instance struct { ID string `json:"ID"` Node string `json:"Node"` Address string `json:"Address"` Datacenter string `json:"Datacenter"` TaggedAddresses map[string]string `json:"TaggedAddresses"` NodeMeta map[string]string `json:"NodeMeta"` ServiceAddress string `json:"ServiceAddress"` ServiceEnableTagOverride bool `json:"ServiceEnableTagOverride"` ServiceID string `json:"ServiceID"` ServiceName string `json:"ServiceName"` ServicePort int `json:"ServicePort"` ServiceMeta map[string]string `json:"ServiceMeta"` ServiceTaggedAddresses map[string]Address `json:"ServiceTaggedAddresses"` ServiceTags []string `json:"ServiceTags"` ServiceProxyDestination string `json:"ServiceProxyDestination"` ServiceProxy Proxy `json:"ServiceProxy"` ServiceConnect ServiceConnect `json:"ServiceConnect"` }
type KV ¶
type KV interface { // Get will return the value defined at path, for dc. Get(Ctx, string, Query) (string, error) // Put will set value at path, in dc. Put(Ctx, string, string, Query) error // Delete will remove the value at path, in dc. Delete(Ctx, string, Query) error // Keys will list all subpaths in asciibetical order. // The returned paths may be terminal (ie, the value is // stored content) or they may be further traversable like // a directory listing, in dc. Keys(Ctx, string, Query) ([]string, error) // Recurse will recursively descend through path, collecting // all KV pairs along the way, in dc. Recurse(Ctx, string, Query) ([]Pair, error) }
A KV can access the key-value store of consul.
The consul KV store is useful for storing small values of information. It is intended to be used to store things like service configuration and other meta-data. The maximum size of a value is 512KiB.
Each DC contains its own KV store. The data in a KV store is not replicated across DCs.
type KVMock ¶ added in v1.1.3
type KVMock struct { DeleteMock mKVMockDelete GetMock mKVMockGet KeysMock mKVMockKeys PutMock mKVMockPut RecurseMock mKVMockRecurse // contains filtered or unexported fields }
KVMock implements KV
func NewKVMock ¶ added in v1.1.3
func NewKVMock(t minimock.Tester) *KVMock
NewKVMock returns a mock for KV
func (*KVMock) DeleteAfterCounter ¶ added in v1.1.3
DeleteAfterCounter returns a count of finished KVMock.Delete invocations
func (*KVMock) DeleteBeforeCounter ¶ added in v1.1.3
DeleteBeforeCounter returns a count of KVMock.Delete invocations
func (*KVMock) GetAfterCounter ¶ added in v1.1.3
GetAfterCounter returns a count of finished KVMock.Get invocations
func (*KVMock) GetBeforeCounter ¶ added in v1.1.3
GetBeforeCounter returns a count of KVMock.Get invocations
func (*KVMock) KeysAfterCounter ¶ added in v1.1.3
KeysAfterCounter returns a count of finished KVMock.Keys invocations
func (*KVMock) KeysBeforeCounter ¶ added in v1.1.3
KeysBeforeCounter returns a count of KVMock.Keys invocations
func (*KVMock) MinimockDeleteDone ¶ added in v1.1.3
MinimockDeleteDone returns true if the count of the Delete invocations corresponds the number of defined expectations
func (*KVMock) MinimockDeleteInspect ¶ added in v1.1.3
func (m *KVMock) MinimockDeleteInspect()
MinimockDeleteInspect logs each unmet expectation
func (*KVMock) MinimockFinish ¶ added in v1.1.3
func (m *KVMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*KVMock) MinimockGetDone ¶ added in v1.1.3
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*KVMock) MinimockGetInspect ¶ added in v1.1.3
func (m *KVMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*KVMock) MinimockKeysDone ¶ added in v1.1.3
MinimockKeysDone returns true if the count of the Keys invocations corresponds the number of defined expectations
func (*KVMock) MinimockKeysInspect ¶ added in v1.1.3
func (m *KVMock) MinimockKeysInspect()
MinimockKeysInspect logs each unmet expectation
func (*KVMock) MinimockPutDone ¶ added in v1.1.3
MinimockPutDone returns true if the count of the Put invocations corresponds the number of defined expectations
func (*KVMock) MinimockPutInspect ¶ added in v1.1.3
func (m *KVMock) MinimockPutInspect()
MinimockPutInspect logs each unmet expectation
func (*KVMock) MinimockRecurseDone ¶ added in v1.1.3
MinimockRecurseDone returns true if the count of the Recurse invocations corresponds the number of defined expectations
func (*KVMock) MinimockRecurseInspect ¶ added in v1.1.3
func (m *KVMock) MinimockRecurseInspect()
MinimockRecurseInspect logs each unmet expectation
func (*KVMock) MinimockWait ¶ added in v1.1.3
MinimockWait waits for all mocked methods to be called the expected number of times
func (*KVMock) PutAfterCounter ¶ added in v1.1.3
PutAfterCounter returns a count of finished KVMock.Put invocations
func (*KVMock) PutBeforeCounter ¶ added in v1.1.3
PutBeforeCounter returns a count of KVMock.Put invocations
func (*KVMock) RecurseAfterCounter ¶ added in v1.1.3
RecurseAfterCounter returns a count of finished KVMock.Recurse invocations
func (*KVMock) RecurseBeforeCounter ¶ added in v1.1.3
RecurseBeforeCounter returns a count of KVMock.Recurse invocations
type KVMockDeleteExpectation ¶ added in v1.1.3
type KVMockDeleteExpectation struct { Counter uint64 // contains filtered or unexported fields }
KVMockDeleteExpectation specifies expectation struct of the KV.Delete
func (*KVMockDeleteExpectation) Then ¶ added in v1.1.3
func (e *KVMockDeleteExpectation) Then(err error) *KVMock
Then sets up KV.Delete return parameters for the expectation previously defined by the When method
type KVMockDeleteParams ¶ added in v1.1.3
type KVMockDeleteParams struct {
// contains filtered or unexported fields
}
KVMockDeleteParams contains parameters of the KV.Delete
type KVMockDeleteResults ¶ added in v1.1.3
type KVMockDeleteResults struct {
// contains filtered or unexported fields
}
KVMockDeleteResults contains results of the KV.Delete
type KVMockGetExpectation ¶ added in v1.1.3
type KVMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
KVMockGetExpectation specifies expectation struct of the KV.Get
type KVMockGetParams ¶ added in v1.1.3
type KVMockGetParams struct {
// contains filtered or unexported fields
}
KVMockGetParams contains parameters of the KV.Get
type KVMockGetResults ¶ added in v1.1.3
type KVMockGetResults struct {
// contains filtered or unexported fields
}
KVMockGetResults contains results of the KV.Get
type KVMockKeysExpectation ¶ added in v1.1.3
type KVMockKeysExpectation struct { Counter uint64 // contains filtered or unexported fields }
KVMockKeysExpectation specifies expectation struct of the KV.Keys
type KVMockKeysParams ¶ added in v1.1.3
type KVMockKeysParams struct {
// contains filtered or unexported fields
}
KVMockKeysParams contains parameters of the KV.Keys
type KVMockKeysResults ¶ added in v1.1.3
type KVMockKeysResults struct {
// contains filtered or unexported fields
}
KVMockKeysResults contains results of the KV.Keys
type KVMockPutExpectation ¶ added in v1.1.3
type KVMockPutExpectation struct { Counter uint64 // contains filtered or unexported fields }
KVMockPutExpectation specifies expectation struct of the KV.Put
func (*KVMockPutExpectation) Then ¶ added in v1.1.3
func (e *KVMockPutExpectation) Then(err error) *KVMock
Then sets up KV.Put return parameters for the expectation previously defined by the When method
type KVMockPutParams ¶ added in v1.1.3
type KVMockPutParams struct {
// contains filtered or unexported fields
}
KVMockPutParams contains parameters of the KV.Put
type KVMockPutResults ¶ added in v1.1.3
type KVMockPutResults struct {
// contains filtered or unexported fields
}
KVMockPutResults contains results of the KV.Put
type KVMockRecurseExpectation ¶ added in v1.1.3
type KVMockRecurseExpectation struct { Counter uint64 // contains filtered or unexported fields }
KVMockRecurseExpectation specifies expectation struct of the KV.Recurse
type KVMockRecurseParams ¶ added in v1.1.3
type KVMockRecurseParams struct {
// contains filtered or unexported fields
}
KVMockRecurseParams contains parameters of the KV.Recurse
type KVMockRecurseResults ¶ added in v1.1.3
type KVMockRecurseResults struct {
// contains filtered or unexported fields
}
KVMockRecurseResults contains results of the KV.Recurse
type LeaderSession ¶
type LeaderSession interface { Abdicate(Ctx) error Current(Ctx) (string, error) SessionID(Ctx) string }
A LeaderSession is used to inspect and manage the underlying consul session being used to participate in leadership elections.
type LeaderSessionMock ¶ added in v1.1.3
type LeaderSessionMock struct { AbdicateMock mLeaderSessionMockAbdicate CurrentMock mLeaderSessionMockCurrent SessionIDMock mLeaderSessionMockSessionID // contains filtered or unexported fields }
LeaderSessionMock implements LeaderSession
func NewLeaderSessionMock ¶ added in v1.1.3
func NewLeaderSessionMock(t minimock.Tester) *LeaderSessionMock
NewLeaderSessionMock returns a mock for LeaderSession
func (*LeaderSessionMock) Abdicate ¶ added in v1.1.3
func (mmAbdicate *LeaderSessionMock) Abdicate(c1 Ctx) (err error)
Abdicate implements LeaderSession
func (*LeaderSessionMock) AbdicateAfterCounter ¶ added in v1.1.3
func (mmAbdicate *LeaderSessionMock) AbdicateAfterCounter() uint64
AbdicateAfterCounter returns a count of finished LeaderSessionMock.Abdicate invocations
func (*LeaderSessionMock) AbdicateBeforeCounter ¶ added in v1.1.3
func (mmAbdicate *LeaderSessionMock) AbdicateBeforeCounter() uint64
AbdicateBeforeCounter returns a count of LeaderSessionMock.Abdicate invocations
func (*LeaderSessionMock) Current ¶ added in v1.1.3
func (mmCurrent *LeaderSessionMock) Current(c1 Ctx) (s1 string, err error)
Current implements LeaderSession
func (*LeaderSessionMock) CurrentAfterCounter ¶ added in v1.1.3
func (mmCurrent *LeaderSessionMock) CurrentAfterCounter() uint64
CurrentAfterCounter returns a count of finished LeaderSessionMock.Current invocations
func (*LeaderSessionMock) CurrentBeforeCounter ¶ added in v1.1.3
func (mmCurrent *LeaderSessionMock) CurrentBeforeCounter() uint64
CurrentBeforeCounter returns a count of LeaderSessionMock.Current invocations
func (*LeaderSessionMock) MinimockAbdicateDone ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockAbdicateDone() bool
MinimockAbdicateDone returns true if the count of the Abdicate invocations corresponds the number of defined expectations
func (*LeaderSessionMock) MinimockAbdicateInspect ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockAbdicateInspect()
MinimockAbdicateInspect logs each unmet expectation
func (*LeaderSessionMock) MinimockCurrentDone ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockCurrentDone() bool
MinimockCurrentDone returns true if the count of the Current invocations corresponds the number of defined expectations
func (*LeaderSessionMock) MinimockCurrentInspect ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockCurrentInspect()
MinimockCurrentInspect logs each unmet expectation
func (*LeaderSessionMock) MinimockFinish ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*LeaderSessionMock) MinimockSessionIDDone ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockSessionIDDone() bool
MinimockSessionIDDone returns true if the count of the SessionID invocations corresponds the number of defined expectations
func (*LeaderSessionMock) MinimockSessionIDInspect ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockSessionIDInspect()
MinimockSessionIDInspect logs each unmet expectation
func (*LeaderSessionMock) MinimockWait ¶ added in v1.1.3
func (m *LeaderSessionMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*LeaderSessionMock) SessionID ¶ added in v1.1.3
func (mmSessionID *LeaderSessionMock) SessionID(c1 Ctx) (s1 string)
SessionID implements LeaderSession
func (*LeaderSessionMock) SessionIDAfterCounter ¶ added in v1.1.3
func (mmSessionID *LeaderSessionMock) SessionIDAfterCounter() uint64
SessionIDAfterCounter returns a count of finished LeaderSessionMock.SessionID invocations
func (*LeaderSessionMock) SessionIDBeforeCounter ¶ added in v1.1.3
func (mmSessionID *LeaderSessionMock) SessionIDBeforeCounter() uint64
SessionIDBeforeCounter returns a count of LeaderSessionMock.SessionID invocations
type LeaderSessionMockAbdicateExpectation ¶ added in v1.1.3
type LeaderSessionMockAbdicateExpectation struct { Counter uint64 // contains filtered or unexported fields }
LeaderSessionMockAbdicateExpectation specifies expectation struct of the LeaderSession.Abdicate
func (*LeaderSessionMockAbdicateExpectation) Then ¶ added in v1.1.3
func (e *LeaderSessionMockAbdicateExpectation) Then(err error) *LeaderSessionMock
Then sets up LeaderSession.Abdicate return parameters for the expectation previously defined by the When method
type LeaderSessionMockAbdicateParams ¶ added in v1.1.3
type LeaderSessionMockAbdicateParams struct {
// contains filtered or unexported fields
}
LeaderSessionMockAbdicateParams contains parameters of the LeaderSession.Abdicate
type LeaderSessionMockAbdicateResults ¶ added in v1.1.3
type LeaderSessionMockAbdicateResults struct {
// contains filtered or unexported fields
}
LeaderSessionMockAbdicateResults contains results of the LeaderSession.Abdicate
type LeaderSessionMockCurrentExpectation ¶ added in v1.1.3
type LeaderSessionMockCurrentExpectation struct { Counter uint64 // contains filtered or unexported fields }
LeaderSessionMockCurrentExpectation specifies expectation struct of the LeaderSession.Current
func (*LeaderSessionMockCurrentExpectation) Then ¶ added in v1.1.3
func (e *LeaderSessionMockCurrentExpectation) Then(s1 string, err error) *LeaderSessionMock
Then sets up LeaderSession.Current return parameters for the expectation previously defined by the When method
type LeaderSessionMockCurrentParams ¶ added in v1.1.3
type LeaderSessionMockCurrentParams struct {
// contains filtered or unexported fields
}
LeaderSessionMockCurrentParams contains parameters of the LeaderSession.Current
type LeaderSessionMockCurrentResults ¶ added in v1.1.3
type LeaderSessionMockCurrentResults struct {
// contains filtered or unexported fields
}
LeaderSessionMockCurrentResults contains results of the LeaderSession.Current
type LeaderSessionMockSessionIDExpectation ¶ added in v1.1.3
type LeaderSessionMockSessionIDExpectation struct { Counter uint64 // contains filtered or unexported fields }
LeaderSessionMockSessionIDExpectation specifies expectation struct of the LeaderSession.SessionID
func (*LeaderSessionMockSessionIDExpectation) Then ¶ added in v1.1.3
func (e *LeaderSessionMockSessionIDExpectation) Then(s1 string) *LeaderSessionMock
Then sets up LeaderSession.SessionID return parameters for the expectation previously defined by the When method
type LeaderSessionMockSessionIDParams ¶ added in v1.1.3
type LeaderSessionMockSessionIDParams struct {
// contains filtered or unexported fields
}
LeaderSessionMockSessionIDParams contains parameters of the LeaderSession.SessionID
type LeaderSessionMockSessionIDResults ¶ added in v1.1.3
type LeaderSessionMockSessionIDResults struct {
// contains filtered or unexported fields
}
LeaderSessionMockSessionIDResults contains results of the LeaderSession.SessionID
type LeadershipConfig ¶
type LeadershipConfig struct { // Key is the path used to store session information in // the consul KV store. This must be set for the client to be used for // leader election. Typically this value will look something like // "service/<service name>/leader". Key string // ContactInfo is an opaque string that identifies the leader elected node. // This is what clients should use to know how to connect to the service // that is currently the leader. How this string is created, parsed, and // interpreted is an implementation detail left to the clients. Typically, // this string will in the form of a URI. ContactInfo string // Description is an arbitrary human-readable name for this leader election. // If not set, Description defaults to "default-leader-session". Description string // See SessionConfig.LockDelay. LockDelay time.Duration // See SessionConfig.TTL. TTL time.Duration }
type Metrics ¶ added in v1.1.3
type Metrics struct { Timestamp string `json:"Timestamp"` Gauges []Gauge `json:"Gauges"` Counters []Counter `json:"Counters"` Samples []Sample `json:"Samples"` }
Metrics contains information about the agent from the /v1/agent/metrics endpoint.
type Node ¶
type Node struct { Name string `json:"Node"` Address string `json:"Address"` TaggedAddresses map[string]string `json:"TaggedAddresses"` }
A Node represents a host on which a consul agent is running.
type NodeInfo ¶
type NodeInfo struct { Node Node `json:"Node"` Services map[string]struct { ID string `json:"ID"` Service string `json:"Service"` Tags []string `json:"Tags"` Port int `json:"Port"` } `json:"Services"` }
A NodeInfo contains detailed information about a node, including all of the services defined to exist on that node.
type NodeQuery ¶ added in v1.1.3
type NodeQuery struct { // DC indicates the datacenter to query. // // If blank, this will default to the datacenter that the queried agent is in. DC string // Filter specifies an advanced filtering expression. // // https://www.consul.io/api/features/filtering.html Filter string }
A NodeQuery is used to define values for each of the optional parameters to the catalog node endpoint.
type NodesQuery ¶ added in v1.1.3
type NodesQuery struct { // DC indicates the datacenter to query. // // If blank, this will default to the datacenter that the queried agent is in. DC string // Near specifies which node should be treated as the "center" in terms of // round-trip time for ordering the returned nodes. Nodes at the beginning // of the list will have the shortest round-trip times to the given node. // // The value "_agent" will cause the agent's node to be used for the sort. // // If blank, no default behavior is defined. Near string // NodeMeta creates a filter based on node metadata, using the given list // of key:value pairs. // // If blank, no node metadata filter is applied. NodeMeta []Pair // Filter specifies an advanced filtering expression. // // https://www.consul.io/api/features/filtering.html Filter string }
NodesQuery is used to define values for each of the optional parameters to the catalog nodes endpoint.
type RequestError ¶
type RequestError struct {
// contains filtered or unexported fields
}
RequestError exposes the status code of a http request error
func (*RequestError) Error ¶
func (h *RequestError) Error() string
func (*RequestError) StatusCode ¶
func (h *RequestError) StatusCode() int
type ServiceConnect ¶ added in v1.1.3
type ServiceConnect struct {
Native bool `json:"Native"`
}
type ServiceQuery ¶ added in v1.1.3
type ServiceQuery struct { // DC indicates the datacenter to query. // // If blank, this will default to the datacenter that the queried agent is in. DC string // Tags specifies a list of tags to filter on. Only instances matching all // given tags will be returned. Tags []string // Near specifies which node should be treated as the "center" in terms of // round-trip time for ordering the returned nodes. Nodes at the beginning // of the list will have the shortest round-trip times to the given node. // // The value "_agent" will cause the agent's node to be used for the sort. // // If blank, no default behavior is defined. Near string // NodeMeta creates a filter based on node metadata, using the given list // of key:value pairs. // // If blank, no node metadata filter is applied. NodeMeta []Pair // Filter specifies an advanced filtering expression. // // https://www.consul.io/api/features/filtering.html Filter string }
type ServicesQuery ¶ added in v1.1.3
type ServicesQuery struct { // DC indicates the datacenter to query. // // If blank, this will default to the datacenter that the queried agent is in. DC string // NodeMeta creates a filter based on node metadata, using the given list // of key:value pairs. // // If blank, no node metadata filter is applied. NodeMeta []Pair }
type Session ¶
type Session interface { // CreateSession will initialize a new session. // // https://www.consul.io/api/session.html#create-session CreateSession(Ctx, SessionConfig) (SessionID, error) // DeleteSession will delete session of id. // // https://www.consul.io/api/session.html#delete-session DeleteSession(Ctx, SessionQuery) error // ReadSession will return the session information for id. // // https://www.consul.io/api/session.html#read-session ReadSession(Ctx, SessionQuery) (SessionConfig, error) // ListSessions will list every session on node. // // https://www.consul.io/api/session.html#list-sessions-for-node ListSessions(ctx Ctx, dc, node string) (map[SessionID]SessionConfig, error) // RenewSession will renew session of id. // // https://www.consul.io/api/session.html#renew-session RenewSession(Ctx, SessionQuery) (time.Duration, error) }
type SessionConfig ¶
type SessionConfig struct { // The DC in which the node holding the session. DC string `json:"-"` // not part of the official API // The node with which the session is associated. Typically, this should be // set to the node name of the local consul agent. That information can be // retrieved using the Self endpoint. Node string `json:"Node"` // Name is a human-readable identifier for this session. Name string `json:"Name"` // LockDelay determines the minimum amount of time that must pass // after a lock expiration before a new lock acquisition may take place. // The use of such a delay is to allow the potentially still-alive leader // to detect its own lock invalidation and stop processing requests that // may lead to an inconsistent state. This mechanism is not "bullet-proof", // but it eliminates the need for clients to include their own timeout code. // A zero-value disables this feature. LockDelay time.Duration `json:"LockDelay"` // TTL represents the amount of time that may pass before the session // automatically becomes invalidated. Typically a lower value for TTL // is better, as a node that unexpectedly goes "off the grid" will // continue to own the lock until the TTL expires. TTL time.Duration `json:"TTL"` // Behavior controls what action to take when a session is invalidated. // - SessionRelease: causes any held locks to be released. // - SessionDelete: causes any held locks to be deleted. Behavior SessionTerminationBehavior `json:"Behavior"` }
type SessionMock ¶ added in v1.1.3
type SessionMock struct { CreateSessionMock mSessionMockCreateSession DeleteSessionMock mSessionMockDeleteSession ListSessionsMock mSessionMockListSessions ReadSessionMock mSessionMockReadSession RenewSessionMock mSessionMockRenewSession // contains filtered or unexported fields }
SessionMock implements Session
func NewSessionMock ¶ added in v1.1.3
func NewSessionMock(t minimock.Tester) *SessionMock
NewSessionMock returns a mock for Session
func (*SessionMock) CreateSession ¶ added in v1.1.3
func (mmCreateSession *SessionMock) CreateSession(c1 Ctx, s1 SessionConfig) (s2 SessionID, err error)
CreateSession implements Session
func (*SessionMock) CreateSessionAfterCounter ¶ added in v1.1.3
func (mmCreateSession *SessionMock) CreateSessionAfterCounter() uint64
CreateSessionAfterCounter returns a count of finished SessionMock.CreateSession invocations
func (*SessionMock) CreateSessionBeforeCounter ¶ added in v1.1.3
func (mmCreateSession *SessionMock) CreateSessionBeforeCounter() uint64
CreateSessionBeforeCounter returns a count of SessionMock.CreateSession invocations
func (*SessionMock) DeleteSession ¶ added in v1.1.3
func (mmDeleteSession *SessionMock) DeleteSession(c1 Ctx, s1 SessionQuery) (err error)
DeleteSession implements Session
func (*SessionMock) DeleteSessionAfterCounter ¶ added in v1.1.3
func (mmDeleteSession *SessionMock) DeleteSessionAfterCounter() uint64
DeleteSessionAfterCounter returns a count of finished SessionMock.DeleteSession invocations
func (*SessionMock) DeleteSessionBeforeCounter ¶ added in v1.1.3
func (mmDeleteSession *SessionMock) DeleteSessionBeforeCounter() uint64
DeleteSessionBeforeCounter returns a count of SessionMock.DeleteSession invocations
func (*SessionMock) ListSessions ¶ added in v1.1.3
func (mmListSessions *SessionMock) ListSessions(ctx Ctx, dc string, node string) (m1 map[SessionID]SessionConfig, err error)
ListSessions implements Session
func (*SessionMock) ListSessionsAfterCounter ¶ added in v1.1.3
func (mmListSessions *SessionMock) ListSessionsAfterCounter() uint64
ListSessionsAfterCounter returns a count of finished SessionMock.ListSessions invocations
func (*SessionMock) ListSessionsBeforeCounter ¶ added in v1.1.3
func (mmListSessions *SessionMock) ListSessionsBeforeCounter() uint64
ListSessionsBeforeCounter returns a count of SessionMock.ListSessions invocations
func (*SessionMock) MinimockCreateSessionDone ¶ added in v1.1.3
func (m *SessionMock) MinimockCreateSessionDone() bool
MinimockCreateSessionDone returns true if the count of the CreateSession invocations corresponds the number of defined expectations
func (*SessionMock) MinimockCreateSessionInspect ¶ added in v1.1.3
func (m *SessionMock) MinimockCreateSessionInspect()
MinimockCreateSessionInspect logs each unmet expectation
func (*SessionMock) MinimockDeleteSessionDone ¶ added in v1.1.3
func (m *SessionMock) MinimockDeleteSessionDone() bool
MinimockDeleteSessionDone returns true if the count of the DeleteSession invocations corresponds the number of defined expectations
func (*SessionMock) MinimockDeleteSessionInspect ¶ added in v1.1.3
func (m *SessionMock) MinimockDeleteSessionInspect()
MinimockDeleteSessionInspect logs each unmet expectation
func (*SessionMock) MinimockFinish ¶ added in v1.1.3
func (m *SessionMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*SessionMock) MinimockListSessionsDone ¶ added in v1.1.3
func (m *SessionMock) MinimockListSessionsDone() bool
MinimockListSessionsDone returns true if the count of the ListSessions invocations corresponds the number of defined expectations
func (*SessionMock) MinimockListSessionsInspect ¶ added in v1.1.3
func (m *SessionMock) MinimockListSessionsInspect()
MinimockListSessionsInspect logs each unmet expectation
func (*SessionMock) MinimockReadSessionDone ¶ added in v1.1.3
func (m *SessionMock) MinimockReadSessionDone() bool
MinimockReadSessionDone returns true if the count of the ReadSession invocations corresponds the number of defined expectations
func (*SessionMock) MinimockReadSessionInspect ¶ added in v1.1.3
func (m *SessionMock) MinimockReadSessionInspect()
MinimockReadSessionInspect logs each unmet expectation
func (*SessionMock) MinimockRenewSessionDone ¶ added in v1.1.3
func (m *SessionMock) MinimockRenewSessionDone() bool
MinimockRenewSessionDone returns true if the count of the RenewSession invocations corresponds the number of defined expectations
func (*SessionMock) MinimockRenewSessionInspect ¶ added in v1.1.3
func (m *SessionMock) MinimockRenewSessionInspect()
MinimockRenewSessionInspect logs each unmet expectation
func (*SessionMock) MinimockWait ¶ added in v1.1.3
func (m *SessionMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*SessionMock) ReadSession ¶ added in v1.1.3
func (mmReadSession *SessionMock) ReadSession(c1 Ctx, s1 SessionQuery) (s2 SessionConfig, err error)
ReadSession implements Session
func (*SessionMock) ReadSessionAfterCounter ¶ added in v1.1.3
func (mmReadSession *SessionMock) ReadSessionAfterCounter() uint64
ReadSessionAfterCounter returns a count of finished SessionMock.ReadSession invocations
func (*SessionMock) ReadSessionBeforeCounter ¶ added in v1.1.3
func (mmReadSession *SessionMock) ReadSessionBeforeCounter() uint64
ReadSessionBeforeCounter returns a count of SessionMock.ReadSession invocations
func (*SessionMock) RenewSession ¶ added in v1.1.3
func (mmRenewSession *SessionMock) RenewSession(c1 Ctx, s1 SessionQuery) (d1 time.Duration, err error)
RenewSession implements Session
func (*SessionMock) RenewSessionAfterCounter ¶ added in v1.1.3
func (mmRenewSession *SessionMock) RenewSessionAfterCounter() uint64
RenewSessionAfterCounter returns a count of finished SessionMock.RenewSession invocations
func (*SessionMock) RenewSessionBeforeCounter ¶ added in v1.1.3
func (mmRenewSession *SessionMock) RenewSessionBeforeCounter() uint64
RenewSessionBeforeCounter returns a count of SessionMock.RenewSession invocations
type SessionMockCreateSessionExpectation ¶ added in v1.1.3
type SessionMockCreateSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
SessionMockCreateSessionExpectation specifies expectation struct of the Session.CreateSession
func (*SessionMockCreateSessionExpectation) Then ¶ added in v1.1.3
func (e *SessionMockCreateSessionExpectation) Then(s2 SessionID, err error) *SessionMock
Then sets up Session.CreateSession return parameters for the expectation previously defined by the When method
type SessionMockCreateSessionParams ¶ added in v1.1.3
type SessionMockCreateSessionParams struct {
// contains filtered or unexported fields
}
SessionMockCreateSessionParams contains parameters of the Session.CreateSession
type SessionMockCreateSessionResults ¶ added in v1.1.3
type SessionMockCreateSessionResults struct {
// contains filtered or unexported fields
}
SessionMockCreateSessionResults contains results of the Session.CreateSession
type SessionMockDeleteSessionExpectation ¶ added in v1.1.3
type SessionMockDeleteSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
SessionMockDeleteSessionExpectation specifies expectation struct of the Session.DeleteSession
func (*SessionMockDeleteSessionExpectation) Then ¶ added in v1.1.3
func (e *SessionMockDeleteSessionExpectation) Then(err error) *SessionMock
Then sets up Session.DeleteSession return parameters for the expectation previously defined by the When method
type SessionMockDeleteSessionParams ¶ added in v1.1.3
type SessionMockDeleteSessionParams struct {
// contains filtered or unexported fields
}
SessionMockDeleteSessionParams contains parameters of the Session.DeleteSession
type SessionMockDeleteSessionResults ¶ added in v1.1.3
type SessionMockDeleteSessionResults struct {
// contains filtered or unexported fields
}
SessionMockDeleteSessionResults contains results of the Session.DeleteSession
type SessionMockListSessionsExpectation ¶ added in v1.1.3
type SessionMockListSessionsExpectation struct { Counter uint64 // contains filtered or unexported fields }
SessionMockListSessionsExpectation specifies expectation struct of the Session.ListSessions
func (*SessionMockListSessionsExpectation) Then ¶ added in v1.1.3
func (e *SessionMockListSessionsExpectation) Then(m1 map[SessionID]SessionConfig, err error) *SessionMock
Then sets up Session.ListSessions return parameters for the expectation previously defined by the When method
type SessionMockListSessionsParams ¶ added in v1.1.3
type SessionMockListSessionsParams struct {
// contains filtered or unexported fields
}
SessionMockListSessionsParams contains parameters of the Session.ListSessions
type SessionMockListSessionsResults ¶ added in v1.1.3
type SessionMockListSessionsResults struct {
// contains filtered or unexported fields
}
SessionMockListSessionsResults contains results of the Session.ListSessions
type SessionMockReadSessionExpectation ¶ added in v1.1.3
type SessionMockReadSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
SessionMockReadSessionExpectation specifies expectation struct of the Session.ReadSession
func (*SessionMockReadSessionExpectation) Then ¶ added in v1.1.3
func (e *SessionMockReadSessionExpectation) Then(s2 SessionConfig, err error) *SessionMock
Then sets up Session.ReadSession return parameters for the expectation previously defined by the When method
type SessionMockReadSessionParams ¶ added in v1.1.3
type SessionMockReadSessionParams struct {
// contains filtered or unexported fields
}
SessionMockReadSessionParams contains parameters of the Session.ReadSession
type SessionMockReadSessionResults ¶ added in v1.1.3
type SessionMockReadSessionResults struct {
// contains filtered or unexported fields
}
SessionMockReadSessionResults contains results of the Session.ReadSession
type SessionMockRenewSessionExpectation ¶ added in v1.1.3
type SessionMockRenewSessionExpectation struct { Counter uint64 // contains filtered or unexported fields }
SessionMockRenewSessionExpectation specifies expectation struct of the Session.RenewSession
func (*SessionMockRenewSessionExpectation) Then ¶ added in v1.1.3
func (e *SessionMockRenewSessionExpectation) Then(d1 time.Duration, err error) *SessionMock
Then sets up Session.RenewSession return parameters for the expectation previously defined by the When method
type SessionMockRenewSessionParams ¶ added in v1.1.3
type SessionMockRenewSessionParams struct {
// contains filtered or unexported fields
}
SessionMockRenewSessionParams contains parameters of the Session.RenewSession
type SessionMockRenewSessionResults ¶ added in v1.1.3
type SessionMockRenewSessionResults struct {
// contains filtered or unexported fields
}
SessionMockRenewSessionResults contains results of the Session.RenewSession
type SessionQuery ¶ added in v1.1.3
type SessionQuery struct { // ID of the session for which the query is regarding. ID SessionID // DC indicates which dc to query. // // If blank, this will default to the dc that the queried agent is in. DC string }
SessionQuery is used to define values for each of the optional parameters on the session endpoint.
type SessionTerminationBehavior ¶
type SessionTerminationBehavior string