Versions in this module Expand all Collapse all v0 v0.4.0-beta.7 Aug 23, 2026 v0.4.0-beta.6 Aug 23, 2026 v0.4.0-beta.5 Aug 22, 2026 v0.4.0-beta.4 Aug 21, 2026 v0.4.0-beta.3 Aug 5, 2026 v0.4.0-beta.2 Aug 1, 2026 v0.4.0-beta.1 Jul 29, 2026 v0.3.0 Jun 8, 2026 v0.2.0 May 25, 2026 v0.1.56 Mar 27, 2026 v0.1.55 Mar 24, 2026 v0.1.54 Mar 24, 2026 v0.1.53 Mar 23, 2026 v0.1.52 Mar 23, 2026 v0.1.51 Mar 23, 2026 v0.1.5 Mar 22, 2026 Changes in this version + func HashToken(token string) string + type AggregatedResponse struct + Servers map[string]ServerResult + func AggregateFromPeers(ctx context.Context, localData []byte, mgr *Manager, path string) *AggregatedResponse + type Client struct + func NewClient(baseURL, apiKey string, timeout time.Duration) *Client + func (c *Client) Do(ctx context.Context, method, path string, body io.Reader) (*http.Response, error) + func (c *Client) Forward(ctx context.Context, method, path string, body io.Reader) ([]byte, int, map[string]string, error) + func (c *Client) Get(ctx context.Context, path string) ([]byte, int, error) + func (c *Client) Health(ctx context.Context) error + func (c *Client) Post(ctx context.Context, path string, body []byte) ([]byte, int, error) + type DB struct + func NewDB(deploymentsPath string) (*DB, error) + func (db *DB) Close() error + func (db *DB) ConsumeInvite(tokenHash string, peerName string) error + func (db *DB) CreateInvite(invite *Invite) (int64, error) + func (db *DB) CreatePeer(peer *Peer) (int64, error) + func (db *DB) DeletePeer(name string) error + func (db *DB) GetInviteByHash(tokenHash string) (*Invite, error) + func (db *DB) GetPeer(name string) (*Peer, error) + func (db *DB) ListPeers() ([]Peer, error) + func (db *DB) UpdateLastSeen(name string) error + type Invite struct + AcceptedPeer string + CreatedAt time.Time + CreatedBy int64 + ExpiresAt time.Time + ID int64 + Status string + TokenHash string + type Manager struct + func NewManager(db *DB, serverName string, healthInterval, requestTimeout time.Duration, ...) *Manager + func (m *Manager) AddPeer(name, url, apiKey string) error + func (m *Manager) DB() *DB + func (m *Manager) ForEachPeer(ctx context.Context, ...) map[string]Result + func (m *Manager) GetPeer(name string) (*Client, error) + func (m *Manager) ListPeers() []PeerStatus + func (m *Manager) RemovePeer(name string) error + func (m *Manager) ServerName() string + func (m *Manager) Start(ctx context.Context) error + func (m *Manager) Stop() + type Peer struct + APIKeyEncrypted string + APIKeyHash string + CreatedAt time.Time + ID int64 + LastSeenAt time.Time + Name string + Status string + URL string + type PeerStatus struct + Error string + LastSeen time.Time + Name string + Online bool + URL string + type Result struct + Data []byte + Error string + type ServerResult struct + Data json.RawMessage + Error string + Name string + Online bool