Versions in this module Expand all Collapse all v0 v0.0.0 Feb 25, 2025 Changes in this version + var StateCounters = []prometheus.CounterDefinition + type CheckState struct + Check *structs.HealthCheck + CriticalTime time.Time + DeferCheck *time.Timer + Deleted bool + InSync bool + IsLocallyDefined bool + Token string + func (c *CheckState) Clone() *CheckState + func (c *CheckState) Critical() bool + func (c *CheckState) CriticalFor() time.Duration + type Config struct + AdvertiseAddr string + CheckUpdateInterval time.Duration + Datacenter string + DiscardCheckOutput bool + NodeID types.NodeID + NodeLocality *structs.Locality + NodeName string + Partition string + TaggedAddresses map[string]string + type ServiceState struct + Deleted bool + InSync bool + IsLocallyDefined bool + Service *structs.NodeService + Token string + WatchCh chan struct{} + func (s *ServiceState) Clone() *ServiceState + type State struct + Delegate rpc + TriggerSyncChanges func() + func NewState(c Config, logger hclog.Logger, tokens *token.Store) *State + func TestState(_ testing.T) *State + func (l *State) AddAliasCheck(checkID structs.CheckID, srcServiceID structs.ServiceID, ...) error + func (l *State) AddCheck(check *structs.HealthCheck, token string, isLocallyDefined bool) error + func (l *State) AddServiceWithChecks(service *structs.NodeService, checks []*structs.HealthCheck, token string, ...) error + func (l *State) AllCheckStates() map[structs.CheckID]*CheckState + func (l *State) AllChecks() map[structs.CheckID]*structs.HealthCheck + func (l *State) AllCriticalCheckStates() map[structs.CheckID]*CheckState + func (l *State) AllServices() map[structs.ServiceID]*structs.NodeService + func (l *State) Check(id structs.CheckID) *structs.HealthCheck + func (l *State) CheckState(id structs.CheckID) *CheckState + func (l *State) CheckStates(entMeta *acl.EnterpriseMeta) map[structs.CheckID]*CheckState + func (l *State) CheckToken(id structs.CheckID) string + func (l *State) Checks(entMeta *acl.EnterpriseMeta) map[structs.CheckID]*structs.HealthCheck + func (l *State) ChecksForService(serviceID structs.ServiceID, includeNodeChecks bool) map[structs.CheckID]*structs.HealthCheck + func (l *State) CriticalCheckStates(entMeta *acl.EnterpriseMeta) map[structs.CheckID]*CheckState + func (l *State) LoadMetadata(data map[string]string) error + func (l *State) Metadata() map[string]string + func (l *State) Notify(ch chan<- struct{}) + func (l *State) RemoveAliasCheck(checkID structs.CheckID, srcServiceID structs.ServiceID) + func (l *State) RemoveCheck(id structs.CheckID) error + func (l *State) RemoveService(id structs.ServiceID) error + func (l *State) RemoveServiceWithChecks(serviceID structs.ServiceID, checkIDs []structs.CheckID) error + func (l *State) Service(id structs.ServiceID) *structs.NodeService + func (l *State) ServiceExists(serviceID structs.ServiceID) bool + func (l *State) ServiceState(id structs.ServiceID) *ServiceState + func (l *State) ServiceStates(entMeta *acl.EnterpriseMeta) map[structs.ServiceID]*ServiceState + func (l *State) ServiceToken(id structs.ServiceID) string + func (l *State) Services(entMeta *acl.EnterpriseMeta) map[structs.ServiceID]*structs.NodeService + func (l *State) ServicesByName(sn structs.ServiceName) []*structs.NodeService + func (l *State) SetCheckState(c *CheckState) + func (l *State) SetDiscardCheckOutput(b bool) + func (l *State) SetServiceState(s *ServiceState) + func (l *State) Stats() map[string]string + func (l *State) StopNotify(ch chan<- struct{}) + func (l *State) SyncChanges() error + func (l *State) SyncFull() error + func (l *State) UnloadMetadata() + func (l *State) UpdateCheck(id structs.CheckID, status, output string)