Versions in this module Expand all Collapse all v2 v2.17.0 Oct 2, 2026 v2.16.0 Oct 2, 2026 Changes in this version + const ConfigSchema + const DefaultConfigPollInterval + const DefaultDiscoveryPrefix + const DefaultHeartbeatInterval + const DefaultTimeout + const DiscoveryMeasurement + const EnvToken + const HeaderConfigRevision + const HeartbeatFunction + const HeartbeatMeasurement + const InfraBucket + var ErrNotRegistered = errors.New("fleet: not registered") + var ErrUnauthorized = errors.New("fleet: request not authorized") + var ErrUnknownInstance = errors.New("fleet: unknown or deregistered instance") + var ErrUnreachable = errors.New("fleet: cc-backend unreachable") + var ServiceTypes = []ServiceType + func Bucket(cluster string) string + func DecodeHeartbeats(data []byte) ([]string, error) + func DiscoverySubject(prefix, bucket string, consumer ServiceType) string + func EncodeHeartbeat(t time.Time, instanceIDs ...string) ([]byte, error) + func EncodeRoster(bucket string, consumer ServiceType, providers []Provider, t time.Time) ([]byte, error) + func ParseHeartbeat(m lp.CCMessage) (string, error) + type Client struct + func New(opts Options) (*Client, error) + func (c *Client) Bootstrap(ctx context.Context, timeout time.Duration) (Update, error) + func (c *Client) Close(ctx context.Context) error + func (c *Client) Configs() <-chan Update + func (c *Client) Deregister(ctx context.Context) error + func (c *Client) Heartbeat(ctx context.Context) error + func (c *Client) PullConfig(ctx context.Context) (Update, bool, error) + func (c *Client) Register(ctx context.Context) (RegisterResponse, error) + func (c *Client) Registered() bool + func (c *Client) Rosters() <-chan []Provider + func (c *Client) Run(ctx context.Context) error + func (c *Client) Scope() Scope + type Config struct + CachePath string + Cluster string + ConfigPollInterval string + DiscoverySubjectPrefix string + HeartbeatInterval string + HeartbeatSubject string + Hostname string + Timeout string + Token string + URL string + func ParseConfig(raw json.RawMessage) (Config, error) + type Options struct + Config Config + HTTPClient *http.Client + Meta map[string]string + NATS func() *nats.Client + ServiceType ServiceType + type Provider struct + Hostname string + Meta map[string]string + State string + Type ServiceType + func DecodeRoster(data []byte) ([]Provider, error) + type RegisterRequest struct + Cluster string + Hostname string + MetaData map[string]string + ServiceType ServiceType + type RegisterResponse struct + ConfigRevision int64 + InstanceID string + type Scope string + const ScopeCluster + const ScopeInfra + type ServiceType string + const ServiceBackend + const ServiceEnergyManager + const ServiceEventStore + const ServiceMetricCollector + const ServiceMetricStore + const ServiceNodeController + const ServiceSlurmAdapter + func (t ServiceType) Valid() bool + type Source int + const SourceCache + const SourceFleet + const SourceNone + func (s Source) String() string + type StatusError struct + Code int + Detail string + Op string + Status string + func (e *StatusError) Error() string + func (e *StatusError) Unwrap() error + type Update struct + Config json.RawMessage + Revision string + Source Source