Versions in this module Expand all Collapse all v1 v1.0.2 Aug 7, 2025 v1.0.1 Aug 7, 2025 v1.0.0 Aug 7, 2025 Changes in this version + type Manager struct + func NewManager(logger ...*logrus.Logger) (*Manager, error) + func (m *Manager) CheckHealth() (bool, error) + func (m *Manager) Close() error + func (m *Manager) CloseManager() error + func (m *Manager) GetNodeByAddress(ctx context.Context, address string) (*NodeInfo, error) + func (m *Manager) GetNodeByHostname(ctx context.Context, hostname string) (*NodeInfo, error) + func (m *Manager) GetNodeByID(ctx context.Context, nodeID string) (*NodeInfo, error) + func (m *Manager) GetNodeDetails() ([]NodeInfo, error) + func (m *Manager) GetNodeID() string + func (m *Manager) GetNodes(ctx context.Context) ([]*NodeInfo, error) + func (m *Manager) InitMembershipProtocol() error + func (m *Manager) JoinCluster(host string) error + func (m *Manager) LeaveCluster() error + func (m *Manager) ListNodes(ctx context.Context) ([]interface{}, error) + func (m *Manager) RegisterNode(ctx context.Context, nodeInfo *NodeInfo) error + func (m *Manager) RemoveNode(ctx context.Context, nodeID string) error + func (m *Manager) SetNetworkManager(networkManager interface{}) + func (m *Manager) StartDiscovery() error + func (m *Manager) StartHealthMonitoring(ctx context.Context, interval time.Duration) + func (m *Manager) UpdateNodeResources(ctx context.Context, nodeID string, resources Resources) error + func (m *Manager) UpdateNodeStatus(ctx context.Context, nodeID string, status NodeStatus) error + func (m *Manager) WithMembership(membership MembershipManagerInterface) *Manager + func (m *Manager) WithMembershipManager(membershipManager MembershipManagerInterface) *Manager + func (m *Manager) WithStorage(storage *storage.Manager) *Manager + type MembershipManagerInterface interface + AddMember func(nodeID string, address string) + GetMembers func(ctx context.Context) ([]string, error) + Join func(addresses []string) (int, error) + Leave func(timeout time.Duration) error + RemoveMember func(ctx context.Context, nodeID string) error + type NodeHealth struct + CheckCount uint32 + FailureCount uint32 + IsHealthy bool + LastCheck time.Time + MaxFailureThreshold uint32 + type NodeInfo struct + Address string + Hostname string + ID string + LastSeen time.Time + Resources NodeResources + Status NodeStatus + type NodeResources struct + CPU int + CPUAvailable float64 + ContainersRunning uint32 + Disk int64 + IsLeader bool + Memory int + MemoryAvailable uint64 + type NodeStatus string + const NodeStatusError + const NodeStatusMaintenance + const NodeStatusOffline + const NodeStatusReady + type Resources struct + CPU int + Disk int64 + Memory int