Documentation ¶
Overview ¶
Code generated by mockery v1.0.0
Index ¶
- Constants
- func TestFetchCh(t testing.T, typ cache.Type, opts cache.FetchOptions, req cache.Request) <-chan interface{}
- func TestFetchChResult(t testing.T, ch <-chan interface{}, expected interface{})
- type Agent
- type CatalogDatacenters
- type CatalogListServices
- type CatalogServices
- type CompiledDiscoveryChain
- type ConfigEntries
- type ConnectCALeaf
- type ConnectCALeafRequest
- type ConnectCARoot
- type HealthServices
- type IntentionMatch
- type InternalServiceDump
- type MockRPC
- type NodeServices
- type PreparedQuery
- type RPC
- type ResolvedServiceConfig
- type ServiceHTTPChecks
- type ServiceHTTPChecksRequest
Constants ¶
const CatalogDatacentersName = "catalog-datacenters"
Recommended name for registration.
const CatalogListServicesName = "catalog-list-services"
Recommended name for registration.
const CatalogServicesName = "catalog-services"
Recommended name for registration.
const CompiledDiscoveryChainName = "compiled-discovery-chain"
Recommended name for registration.
const ConfigEntriesName = "config-entries"
Recommended name for registration.
const ConnectCALeafName = "connect-ca-leaf"
Recommended name for registration.
const ConnectCARootName = "connect-ca-root"
Recommended name for registration.
const HealthServicesName = "health-services"
Recommended name for registration.
const IntentionMatchName = "intention-match"
Recommended name for registration.
const InternalServiceDumpName = "service-dump"
Recommended name for registration.
const NodeServicesName = "node-services"
Recommended name for registration.
const PreparedQueryName = "prepared-query"
Recommended name for registration.
const ResolvedServiceConfigName = "resolved-service-config"
Recommended name for registration.
const ServiceHTTPChecksName = "service-http-checks"
Recommended name for registration.
Variables ¶
This section is empty.
Functions ¶
func TestFetchCh ¶
func TestFetchCh( t testing.T, typ cache.Type, opts cache.FetchOptions, req cache.Request) <-chan interface{}
TestFetchCh returns a channel that returns the result of the Fetch call. This is useful for testing timing and concurrency with Fetch calls. Errors will show up as an error type on the resulting channel so a type switch should be used.
func TestFetchChResult ¶
func TestFetchChResult(t testing.T, ch <-chan interface{}, expected interface{})
TestFetchChResult tests that the result from TestFetchCh matches within a reasonable period of time (it expects it to be "immediate" but waits some milliseconds).
Types ¶
type CatalogDatacenters ¶ added in v1.6.0
type CatalogDatacenters struct {
RPC RPC
}
Datacenters supports fetching discovering all the known datacenters
func (*CatalogDatacenters) Fetch ¶ added in v1.6.0
func (c *CatalogDatacenters) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*CatalogDatacenters) SupportsBlocking ¶ added in v1.6.0
func (c *CatalogDatacenters) SupportsBlocking() bool
type CatalogListServices ¶ added in v1.6.0
type CatalogListServices struct {
RPC RPC
}
CatalogListServices supports fetching discovering service names via the catalog.
func (*CatalogListServices) Fetch ¶ added in v1.6.0
func (c *CatalogListServices) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*CatalogListServices) SupportsBlocking ¶ added in v1.6.0
func (c *CatalogListServices) SupportsBlocking() bool
type CatalogServices ¶ added in v1.3.0
type CatalogServices struct {
RPC RPC
}
CatalogServices supports fetching discovering service instances via the catalog.
func (*CatalogServices) Fetch ¶ added in v1.3.0
func (c *CatalogServices) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*CatalogServices) SupportsBlocking ¶ added in v1.3.0
func (c *CatalogServices) SupportsBlocking() bool
type CompiledDiscoveryChain ¶ added in v1.6.0
type CompiledDiscoveryChain struct {
RPC RPC
}
CompiledDiscoveryChain supports fetching the complete discovery chain for a service and caching its compilation.
func (*CompiledDiscoveryChain) Fetch ¶ added in v1.6.0
func (c *CompiledDiscoveryChain) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*CompiledDiscoveryChain) SupportsBlocking ¶ added in v1.6.0
func (c *CompiledDiscoveryChain) SupportsBlocking() bool
type ConfigEntries ¶ added in v1.6.0
type ConfigEntries struct {
RPC RPC
}
ConfigEntries supports fetching discovering configuration entries
func (*ConfigEntries) Fetch ¶ added in v1.6.0
func (c *ConfigEntries) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*ConfigEntries) SupportsBlocking ¶ added in v1.6.0
func (c *ConfigEntries) SupportsBlocking() bool
type ConnectCALeaf ¶
type ConnectCALeaf struct { RPC RPC // RPC client for remote requests Cache *cache.Cache // Cache that has CA root certs via ConnectCARoot Datacenter string // This agent's datacenter // TestOverrideCAChangeInitialDelay allows overriding the random jitter after a // root change with a fixed delay. So far ths is only done in tests. If it's // zero the caChangeInitialSpreadDefault maximum jitter will be used but if // set, it overrides and provides a fixed delay. To essentially disable the // delay in tests they can set it to 1 nanosecond. We may separately allow // configuring the jitter limit by users later but this is different and for // tests only since we need to set a deterministic time delay in order to test // the behavior here fully and determinstically. TestOverrideCAChangeInitialDelay time.Duration // contains filtered or unexported fields }
ConnectCALeaf supports fetching and generating Connect leaf certificates.
func (*ConnectCALeaf) Fetch ¶
func (c *ConnectCALeaf) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*ConnectCALeaf) SupportsBlocking ¶ added in v1.3.0
func (c *ConnectCALeaf) SupportsBlocking() bool
type ConnectCALeafRequest ¶
type ConnectCALeafRequest struct { Token string Datacenter string Service string // Service name, not ID Agent string // Agent name, not ID MinQueryIndex uint64 MaxQueryTime time.Duration }
ConnectCALeafRequest is the cache.Request implementation for the ConnectCALeaf cache type. This is implemented here and not in structs since this is only used for cache-related requests and not forwarded directly to any Consul servers.
func (*ConnectCALeafRequest) CacheInfo ¶
func (r *ConnectCALeafRequest) CacheInfo() cache.RequestInfo
func (*ConnectCALeafRequest) Key ¶ added in v1.5.2
func (r *ConnectCALeafRequest) Key() string
type ConnectCARoot ¶
type ConnectCARoot struct {
RPC RPC
}
ConnectCARoot supports fetching the Connect CA roots. This is a straightforward cache type since it only has to block on the given index and return the data.
func (*ConnectCARoot) Fetch ¶
func (c *ConnectCARoot) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*ConnectCARoot) SupportsBlocking ¶ added in v1.3.0
func (c *ConnectCARoot) SupportsBlocking() bool
type HealthServices ¶ added in v1.3.0
type HealthServices struct {
RPC RPC
}
HealthServices supports fetching discovering service instances via the catalog.
func (*HealthServices) Fetch ¶ added in v1.3.0
func (c *HealthServices) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*HealthServices) SupportsBlocking ¶ added in v1.3.0
func (c *HealthServices) SupportsBlocking() bool
type IntentionMatch ¶
type IntentionMatch struct {
RPC RPC
}
IntentionMatch supports fetching the intentions via match queries.
func (*IntentionMatch) Fetch ¶
func (c *IntentionMatch) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*IntentionMatch) SupportsBlocking ¶ added in v1.3.0
func (c *IntentionMatch) SupportsBlocking() bool
type InternalServiceDump ¶ added in v1.6.0
type InternalServiceDump struct {
RPC RPC
}
InternalServiceDump supports fetching discovering service names via the catalog.
func (*InternalServiceDump) Fetch ¶ added in v1.6.0
func (c *InternalServiceDump) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*InternalServiceDump) SupportsBlocking ¶ added in v1.6.0
func (c *InternalServiceDump) SupportsBlocking() bool
type MockRPC ¶
MockRPC is an autogenerated mock type for the RPC type
type NodeServices ¶ added in v1.4.3
type NodeServices struct {
RPC RPC
}
NodeServices supports fetching discovering service instances via the catalog.
func (*NodeServices) Fetch ¶ added in v1.4.3
func (c *NodeServices) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*NodeServices) SupportsBlocking ¶ added in v1.4.3
func (c *NodeServices) SupportsBlocking() bool
type PreparedQuery ¶ added in v1.3.0
type PreparedQuery struct {
RPC RPC
}
PreparedQuery supports fetching discovering service instances via prepared queries.
func (*PreparedQuery) Fetch ¶ added in v1.3.0
func (c *PreparedQuery) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*PreparedQuery) SupportsBlocking ¶ added in v1.3.0
func (c *PreparedQuery) SupportsBlocking() bool
type RPC ¶
RPC is an interface that an RPC client must implement. This is a helper interface that is implemented by the agent delegate so that Type implementations can request RPC access.
type ResolvedServiceConfig ¶ added in v1.5.0
type ResolvedServiceConfig struct {
RPC RPC
}
ResolvedServiceConfig supports fetching the config for a service resolved from the global proxy defaults and the centrally registered service config.
func (*ResolvedServiceConfig) Fetch ¶ added in v1.5.0
func (c *ResolvedServiceConfig) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*ResolvedServiceConfig) SupportsBlocking ¶ added in v1.5.0
func (c *ResolvedServiceConfig) SupportsBlocking() bool
type ServiceHTTPChecks ¶ added in v1.6.2
type ServiceHTTPChecks struct {
Agent Agent
}
ServiceHTTPBasedChecks supports fetching discovering checks in the local state
func (*ServiceHTTPChecks) Fetch ¶ added in v1.6.2
func (c *ServiceHTTPChecks) Fetch(opts cache.FetchOptions, req cache.Request) (cache.FetchResult, error)
func (*ServiceHTTPChecks) SupportsBlocking ¶ added in v1.6.2
func (c *ServiceHTTPChecks) SupportsBlocking() bool
type ServiceHTTPChecksRequest ¶ added in v1.6.2
type ServiceHTTPChecksRequest struct { ServiceID string MinQueryIndex uint64 MaxQueryTime time.Duration }
ServiceHTTPChecksRequest is the cache.Request implementation for the ServiceHTTPBasedChecks cache type. This is implemented here and not in structs since this is only used for cache-related requests and not forwarded directly to any Consul servers.
func (*ServiceHTTPChecksRequest) CacheInfo ¶ added in v1.6.2
func (s *ServiceHTTPChecksRequest) CacheInfo() cache.RequestInfo
Source Files ¶
- catalog_datacenters.go
- catalog_list_services.go
- catalog_services.go
- config_entry.go
- connect_ca_leaf.go
- connect_ca_root.go
- discovery_chain.go
- health_services.go
- intention_match.go
- mock_RPC.go
- node_services.go
- prepared_query.go
- resolved_service_config.go
- rpc.go
- service_checks.go
- service_dump.go
- testing.go