Versions in this module Expand all Collapse all v11 v11.3.3 Dec 13, 2022 Changes in this version + const SHARDS + func SendHeartbeat(ctx context.Context, handle DownstreamHandle, hb proto.InventoryHeartbeat, ...) + type Auth interface + KeepAliveServer func(context.Context, types.KeepAlive) error + UpsertNode func(context.Context, types.Server) (*types.KeepAlive, error) + type Controller struct + func NewController(auth Auth, opts ...ControllerOption) *Controller + func (c *Controller) Close() error + func (c *Controller) GetControlStream(serverID string) (handle UpstreamHandle, ok bool) + func (c *Controller) Iter(fn func(UpstreamHandle)) + func (c *Controller) RegisterControlStream(stream client.UpstreamInventoryControlStream, ...) + type ControllerOption func(c *controllerOptions) + type DownstreamCreateFunc func(ctx context.Context) (client.DownstreamInventoryControlStream, error) + type DownstreamHandle interface + Close func() error + CloseContext func() context.Context + RegisterPingHandler func(DownstreamPingHandler) (unregister func()) + Sender func() <-chan DownstreamSender + func NewDownstreamHandle(fn DownstreamCreateFunc, hello proto.UpstreamInventoryHello) DownstreamHandle + type DownstreamPingHandler func(sender DownstreamSender, msg proto.DownstreamInventoryPing) + type DownstreamSender interface + Done func() <-chan struct{} + Hello func() proto.DownstreamInventoryHello + Send func(ctx context.Context, msg proto.UpstreamInventoryMessage) error + type Store struct + func NewStore() *Store + func (s *Store) Get(serverID string) (handle UpstreamHandle, ok bool) + func (s *Store) Insert(handle UpstreamHandle) + func (s *Store) Iter(fn func(UpstreamHandle)) + func (s *Store) Len() int + func (s *Store) Remove(handle UpstreamHandle) + type UpstreamHandle interface + HasService func(types.SystemRole) bool + Hello func() proto.UpstreamInventoryHello + Ping func(ctx context.Context) (d time.Duration, err error)