Versions in this module Expand all Collapse all v0 v0.0.0 Feb 25, 2025 Changes in this version + func NewMetricsClient(ctx context.Context, cfg CloudConfig) (telemetry.MetricsClient, error) + type BootstrapConfig struct + BootstrapExpect int + ConsulConfig string + GossipKey string + ManagementToken string + Name string + TLSCAs []string + TLSCert string + TLSCertKey string + type CertificateMetadata struct + CertExpiry time.Time + CertName string + CertSerial string + type Client interface + DiscoverServers func(ctx context.Context) ([]string, error) + FetchBootstrap func(ctx context.Context) (*BootstrapConfig, error) + FetchTelemetryConfig func(ctx context.Context) (*TelemetryConfig, error) + PushServerStatus func(ctx context.Context, status *ServerStatus) error + func NewClient(cfg config.CloudConfig) (Client, error) + type CloudConfig interface + HCPConfig func(opts ...hcpcfg.HCPConfigOption) (hcpcfg.HCPConfig, error) + Resource func() (resource.Resource, error) + type MetricsConfig struct + Endpoint *url.URL + Filters *regexp.Regexp + Labels map[string]string + type MockClient struct + func NewMockClient(t mockConstructorTestingTNewMockClient) *MockClient + func (_m *MockClient) DiscoverServers(ctx context.Context) ([]string, error) + func (_m *MockClient) EXPECT() *MockClient_Expecter + func (_m *MockClient) FetchBootstrap(ctx context.Context) (*BootstrapConfig, error) + func (_m *MockClient) FetchTelemetryConfig(ctx context.Context) (*TelemetryConfig, error) + func (_m *MockClient) PushServerStatus(ctx context.Context, status *ServerStatus) error + type MockClient_DiscoverServers_Call struct + func (_c *MockClient_DiscoverServers_Call) Return(_a0 []string, _a1 error) *MockClient_DiscoverServers_Call + func (_c *MockClient_DiscoverServers_Call) Run(run func(ctx context.Context)) *MockClient_DiscoverServers_Call + func (_c *MockClient_DiscoverServers_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockClient_DiscoverServers_Call + type MockClient_Expecter struct + func (_e *MockClient_Expecter) DiscoverServers(ctx interface{}) *MockClient_DiscoverServers_Call + func (_e *MockClient_Expecter) FetchBootstrap(ctx interface{}) *MockClient_FetchBootstrap_Call + func (_e *MockClient_Expecter) FetchTelemetryConfig(ctx interface{}) *MockClient_FetchTelemetryConfig_Call + func (_e *MockClient_Expecter) PushServerStatus(ctx interface{}, status interface{}) *MockClient_PushServerStatus_Call + type MockClient_FetchBootstrap_Call struct + func (_c *MockClient_FetchBootstrap_Call) Return(_a0 *BootstrapConfig, _a1 error) *MockClient_FetchBootstrap_Call + func (_c *MockClient_FetchBootstrap_Call) Run(run func(ctx context.Context)) *MockClient_FetchBootstrap_Call + func (_c *MockClient_FetchBootstrap_Call) RunAndReturn(run func(context.Context) (*BootstrapConfig, error)) *MockClient_FetchBootstrap_Call + type MockClient_FetchTelemetryConfig_Call struct + func (_c *MockClient_FetchTelemetryConfig_Call) Return(_a0 *TelemetryConfig, _a1 error) *MockClient_FetchTelemetryConfig_Call + func (_c *MockClient_FetchTelemetryConfig_Call) Run(run func(ctx context.Context)) *MockClient_FetchTelemetryConfig_Call + func (_c *MockClient_FetchTelemetryConfig_Call) RunAndReturn(run func(context.Context) (*TelemetryConfig, error)) *MockClient_FetchTelemetryConfig_Call + type MockClient_PushServerStatus_Call struct + func (_c *MockClient_PushServerStatus_Call) Return(_a0 error) *MockClient_PushServerStatus_Call + func (_c *MockClient_PushServerStatus_Call) Run(run func(ctx context.Context, status *ServerStatus)) *MockClient_PushServerStatus_Call + func (_c *MockClient_PushServerStatus_Call) RunAndReturn(run func(context.Context, *ServerStatus) error) *MockClient_PushServerStatus_Call + type MockCloudCfg struct + ConfigErr error + ResourceErr error + func (m MockCloudCfg) HCPConfig(opts ...hcpcfg.HCPConfigOption) (hcpcfg.HCPConfig, error) + func (m MockCloudCfg) Resource() (resource.Resource, error) + type RefreshConfig struct + RefreshInterval time.Duration + type ServerACLInfo struct + Enabled bool + type ServerAutopilot struct + FailureTolerance int + Healthy bool + MinQuorum int + NumServers int + NumVoters int + type ServerRaft struct + AppliedIndex uint64 + IsLeader bool + KnownLeader bool + TimeSinceLastContact time.Duration + type ServerStatus struct + ACL ServerACLInfo + Autopilot ServerAutopilot + Datacenter string + GossipPort int + ID string + LanAddress string + Name string + RPCPort int + Raft ServerRaft + ScadaStatus string + ServerTLSMetadata ServerTLSMetadata + TLS ServerTLSInfo + Version string + type ServerTLSInfo struct + CertExpiry time.Time + CertIssuer string + CertName string + CertSerial string + CertificateAuthorities []CertificateMetadata + Enabled bool + VerifyIncoming bool + VerifyOutgoing bool + VerifyServerHostname bool + type ServerTLSMetadata struct + InternalRPC ServerTLSInfo + type TelemetryConfig struct + MetricsConfig *MetricsConfig + RefreshConfig *RefreshConfig + func (t *TelemetryConfig) MetricsEnabled() bool