Documentation
¶
Overview ¶
Package service represents the agent's core remoteconfig service
The `Service` type provides a communication layer for downstream clients to request configuration, as well as the ability to track clients for requesting complete update payloads from the remote config backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTraceAgentEnv ¶
WithTraceAgentEnv sets the service trace-agent environment variable
Types ¶
type AgentMetadata ¶
type AgentMetadata struct {
Version string `json:"version"`
}
AgentMetadata is data stored in bolt DB to determine whether or not the agent has changed and the RC cache should be cleared
type ConfigFileMetaCustom ¶
type ConfigFileMetaCustom struct { Predicates *pbgo.TracerPredicates `json:"tracer-predicates,omitempty"` Expires int64 `json:"expires"` }
ConfigFileMetaCustom is the custom metadata of a config
type RcTelemetryReporter ¶
type RcTelemetryReporter interface { // IncRateLimit is invoked when a cache bypass request is prevented due to rate limiting IncRateLimit() // IncTimeout is invoked when a cache bypass request is cancelled due to timeout or a previous cache bypass request is still pending IncTimeout() }
RcTelemetryReporter should be implemented by the agent to publish metrics on exceptional cache bypass request events
type Service ¶
Service defines the remote config management service responsible for fetching, storing and dispatching the configurations
func NewService ¶
func NewService(cfg model.Reader, apiKey, baseRawURL, hostname string, telemetryReporter RcTelemetryReporter, agentVersion string, opts ...func(s *Service)) (*Service, error)
NewService instantiates a new remote configuration management service
func (*Service) ClientGetConfigs ¶
func (s *Service) ClientGetConfigs(_ context.Context, request *pbgo.ClientGetConfigsRequest) (*pbgo.ClientGetConfigsResponse, error)
ClientGetConfigs is the polling API called by tracers and agents to get the latest configurations
func (*Service) ConfigGetState ¶
func (s *Service) ConfigGetState() (*pbgo.GetStateConfigResponse, error)
ConfigGetState returns the state of the configuration and the director repos in the local store