cloud

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr           string
	DBPath               string
	AdminToken           string
	NetworkID            string
	ProtocolVersion      string
	MinimumDaemonVersion string
	LeaseTTLSeconds      int
	ServerVersion        string
	AdvertiseURL         string
}

func LoadConfigFromEnv

func LoadConfigFromEnv(env map[string]string, serverVersion string) (Config, error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg Config, service *Service) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, cfg Config) (*Service, error)

func (*Service) AcquireLease

func (s *Service) AcquireLease(ctx context.Context, nodeToken string, _ int) (protocol.CoordinatorLease, error)

func (*Service) Close

func (s *Service) Close() error

func (*Service) CreateJoinKey

func (s *Service) CreateJoinKey(ctx context.Context) (string, error)

func (*Service) ExpireLease

func (s *Service) ExpireLease(ctx context.Context, nodeToken string, fencingToken int64) (protocol.CoordinatorLease, error)

func (*Service) HandoffLease

func (s *Service) HandoffLease(ctx context.Context, nodeToken string, fencingToken int64, targetNodeName string, _ int) (protocol.CoordinatorLease, error)

func (*Service) Heartbeat

func (s *Service) Heartbeat(ctx context.Context, nodeToken string, req protocol.HeartbeatRequest) (protocol.HeartbeatResponse, error)

func (*Service) Join

func (*Service) Leave

func (s *Service) Leave(ctx context.Context, nodeToken string) error

func (*Service) NetworkID

func (s *Service) NetworkID(ctx context.Context) (string, error)

func (*Service) NodeStatus

func (s *Service) NodeStatus(ctx context.Context, nodeToken string) (protocol.NodeStatusResponse, error)

func (*Service) RecordWebhookDelivery

func (s *Service) RecordWebhookDelivery(eventType, deliveryID, repo string)

func (*Service) RenewLease

func (s *Service) RenewLease(ctx context.Context, nodeToken string, fencingToken int64, _ int) (protocol.CoordinatorLease, error)

func (*Service) RevalidateLease

func (s *Service) RevalidateLease(ctx context.Context, nodeToken string, req protocol.CoordinatorLeaseRevalidateRequest) error

func (*Service) Status

func (s *Service) Status(ctx context.Context) (protocol.StatusResponse, error)

func (*Service) Subscribe

func (s *Service) Subscribe() (<-chan protocol.AuditEnvelope, func())

func (*Service) WebhookSecret

func (s *Service) WebhookSecret(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL