Documentation ¶
Index ¶
Constants ¶
const KelvinSSLTargetOverride = "kelvin.%s.svc"
KelvinSSLTargetOverride the hostname used for SSL target override when sending data to Kelvin. Note: This value may differ in the future. When that happens, this should instead come from the Kelvins themselves. rather than this variable, when Kelvins send their updated state.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agents ¶
type Agents struct {
// contains filtered or unexported fields
}
Agents tracks the current state of running agent in the system. It refreshes state in the background to prevent high latencies in the critical path. The pupose of this is to simply orchestrate the agent state update, but not actually store it.
func NewAgents ¶
func NewAgents(mdsClient metadatapb.MetadataServiceClient, signingKey string) *Agents
NewAgents creates a new agent tracker.
func NewAgentsWithInfo ¶
func NewAgentsWithInfo(mdsClient metadatapb.MetadataServiceClient, signingKey string, agentsInfo AgentsInfo) *Agents
NewAgentsWithInfo creates an agent tracker with the AgentsInfo passed in.
func (*Agents) GetAgentInfo ¶
func (a *Agents) GetAgentInfo() AgentsInfo
GetAgentInfo returns the current agent info.
type AgentsInfo ¶
type AgentsInfo interface { ClearPendingState() UpdateAgentsInfo(update *metadatapb.AgentUpdatesResponse) error DistributedState() distributedpb.DistributedState }
AgentsInfo tracks information about the distributed state of the system.
func NewTestAgentsInfo ¶
func NewTestAgentsInfo(ds *distributedpb.DistributedState) AgentsInfo
NewTestAgentsInfo creates an agents info from a passed in distributed state.
type AgentsInfoImpl ¶
type AgentsInfoImpl struct {
// contains filtered or unexported fields
}
AgentsInfoImpl implements AgentsInfo to track information about the distributed state of the system.
func (*AgentsInfoImpl) ClearPendingState ¶
func (a *AgentsInfoImpl) ClearPendingState()
ClearPendingState clears the pending agents info state (the upcoming version).
func (*AgentsInfoImpl) DistributedState ¶
func (a *AgentsInfoImpl) DistributedState() distributedpb.DistributedState
DistributedState returns the current distributed state. Returns a non-pointer because a.ds will change over time and we want the consumer of DistributedState() to have a consistent result.
func (*AgentsInfoImpl) UpdateAgentsInfo ¶
func (a *AgentsInfoImpl) UpdateAgentsInfo(update *metadatapb.AgentUpdatesResponse) error
UpdateAgentsInfo creates a new agent info. This function must be resilient to receiving the same update twice for a given agent.