coordinate

package
v0.0.0-test.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProjectOwner = "miren.system@miren.dev"
	DefaultCloudURL     = "https://api.miren.cloud"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudAuthConfig

type CloudAuthConfig struct {
	Enabled    bool              `json:"enabled" yaml:"enabled"`
	CloudURL   string            `json:"cloud_url" yaml:"cloud_url"`     // URL of miren.cloud (default: https://api.miren.cloud)
	PrivateKey string            `json:"private_key" yaml:"private_key"` // Required: Path to service account private key when enabled
	Tags       map[string]string `json:"tags" yaml:"tags"`               // Tags from registration for RBAC evaluation
	ClusterID  string            `json:"cluster_id" yaml:"cluster_id"`   // Cluster ID for status reporting
}

CloudAuthConfig contains cloud authentication settings

type Coordinator

type Coordinator struct {
	CoordinatorConfig

	Log *slog.Logger
	// contains filtered or unexported fields
}

func NewCoordinator

func NewCoordinator(log *slog.Logger, cfg CoordinatorConfig) *Coordinator

func (*Coordinator) Activator

func (c *Coordinator) Activator() activator.AppActivator

func (*Coordinator) IssueCertificate

func (c *Coordinator) IssueCertificate(name string) (*caauth.ClientCertificate, error)

func (*Coordinator) ListenAddress

func (c *Coordinator) ListenAddress() string

func (*Coordinator) LoadAPICert

func (c *Coordinator) LoadAPICert(ctx context.Context) error

func (*Coordinator) LoadCA

func (c *Coordinator) LoadCA(ctx context.Context) error

func (*Coordinator) LocalConfig

func (c *Coordinator) LocalConfig() (*clientconfig.Config, error)

func (*Coordinator) NamedConfig

func (c *Coordinator) NamedConfig(name string) (*clientconfig.Config, error)

func (*Coordinator) ReportStartupStatus

func (c *Coordinator) ReportStartupStatus(ctx context.Context) error

ReportStatus reports the current cluster status to miren.cloud

func (*Coordinator) ReportStatus

func (c *Coordinator) ReportStatus(ctx context.Context) error

ReportStatus reports the current cluster status to miren.cloud

func (*Coordinator) SandboxPoolManager

func (c *Coordinator) SandboxPoolManager() *sandboxpool.Manager

func (*Coordinator) Server

func (c *Coordinator) Server() *rpc.Server

func (*Coordinator) ServiceConfig

func (c *Coordinator) ServiceConfig() (*clientconfig.Config, error)

func (*Coordinator) Start

func (c *Coordinator) Start(ctx context.Context) error

func (*Coordinator) Stop

func (c *Coordinator) Stop()

Stop stops the coordinator and all managed controllers

type CoordinatorConfig

type CoordinatorConfig struct {
	Address         string              `json:"address" yaml:"address"`
	EtcdEndpoints   []string            `json:"etcd_endpoints" yaml:"etcd_endpoints"`
	Prefix          string              `json:"prefix" yaml:"prefix"`
	Resolver        netresolve.Resolver `json:"resolver" yaml:"resolver"`
	TempDir         string              `json:"temp_dir" yaml:"temp_dir"`
	DataPath        string              `json:"data_path" yaml:"data_path"`
	AdditionalNames []string            `json:"additional_names" yaml:"additional_names"`
	AdditionalIPs   []net.IP            `json:"additional_ips" yaml:"additional_ips"`

	// Cloud authentication configuration
	CloudAuth CloudAuthConfig `json:"cloud_auth" yaml:"cloud_auth"`

	Mem  *metrics.MemoryUsage
	Cpu  *metrics.CPUUsage
	HTTP *metrics.HTTPMetrics
	Logs *observability.LogReader
}

Jump to

Keyboard shortcuts

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