Documentation ¶
Overview ¶
package cellprovider contains logic to create and manage groups of servers
Index ¶
- Variables
- type AdvanceDeploymentResult
- type CellProvider
- type CreateCellOptions
- type DeploymentLogsOption
- type DeploymentLogsOptions
- type DeploymentLogsResult
- type LogEntry
- type NodeInfo
- type NodeLabelInfo
- type ServerStats
- type ServerStatsResult
- type TalosClusterCellProvider
- func (p *TalosClusterCellProvider) AdvanceDeployment(ctx context.Context, cellId string, deployment *store.Deployment) (*AdvanceDeploymentResult, error)
- func (p *TalosClusterCellProvider) CreateCell(ctx context.Context, opts CreateCellOptions) (*store.Cell, error)
- func (p *TalosClusterCellProvider) DeploymentLogs(ctx context.Context, cellId string, deployment *store.Deployment, ...) ([]LogEntry, error)
- func (p *TalosClusterCellProvider) DeploymentLogsStream(ctx context.Context, cellId string, deployment *store.Deployment, ...) <-chan DeploymentLogsResult
- func (p *TalosClusterCellProvider) DestroyDeployments(ctx context.Context, cellId string, deployments []store.Deployment) error
- func (p *TalosClusterCellProvider) ServerStats(ctx context.Context, cellId string) ([]ServerStats, error)
- func (p *TalosClusterCellProvider) ServerStatsStream(ctx context.Context, cellId string, interval time.Duration) <-chan ServerStatsResult
- type TalosClusterCellProviderOption
- func WithCellStore(cellStore store.CellStore) TalosClusterCellProviderOption
- func WithDnsProvider(dnsProvider dnsprovider.DNSProvider) TalosClusterCellProviderOption
- func WithLogger(logger *slog.Logger) TalosClusterCellProviderOption
- func WithServerStore(serverStore store.ServerStore) TalosClusterCellProviderOption
- func WithTmpDirRoot(tmpDirRoot string) TalosClusterCellProviderOption
- func WithTracerProvider(tp *trace.TracerProvider) TalosClusterCellProviderOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDeploymentIdMismatch = errors.New("deployment id mismatch")
Functions ¶
This section is empty.
Types ¶
type AdvanceDeploymentResult ¶
type AdvanceDeploymentResult struct { Status store.DeploymentStatus StatusReason string }
type CellProvider ¶
type CellProvider interface { CreateCell(ctx context.Context, opts CreateCellOptions) (*store.Cell, error) ServerStats(ctx context.Context, cellId string) ([]ServerStats, error) ServerStatsStream(ctx context.Context, cellId string, interval time.Duration) <-chan ServerStatsResult AdvanceDeployment(ctx context.Context, cellId string, deployment *store.Deployment) (*AdvanceDeploymentResult, error) DestroyDeployments(ctx context.Context, cellId string, deployments []store.Deployment) error DeploymentLogs(ctx context.Context, cellId string, deployment *store.Deployment, opts ...DeploymentLogsOption) ([]LogEntry, error) DeploymentLogsStream(ctx context.Context, cellId string, deployment *store.Deployment, opts ...DeploymentLogsOption) <-chan DeploymentLogsResult }
type CreateCellOptions ¶
type CreateCellOptions struct { Name string `valid:"required, matches(^[a-z-]+$)"` TeamId string `valid:"required"` TeamName string `valid:"required"` TeamAgePrivateKey string `valid:"required, matches(^AGE-SECRET-KEY.*$)"` DnsZoneId string `valid:"required"` FirstServer store.Server `valid:"required"` }
type DeploymentLogsOption ¶
type DeploymentLogsOption func(*DeploymentLogsOptions)
DeploymentLogsOption is a function that modifies DeploymentLogsOptions
func WithSince ¶
func WithSince(duration time.Duration) DeploymentLogsOption
WithSince sets the Since option for deployment logs
type DeploymentLogsOptions ¶
DeploymentLogsOptions defines options for fetching deployment logs
type DeploymentLogsResult ¶
type NodeInfo ¶
type NodeInfo struct { Ipv4 string NodeLabelInfo }
NodeInfo represents the information of a node including its external IP and labels.
type NodeLabelInfo ¶
type ServerStats ¶
type ServerStatsResult ¶
type ServerStatsResult struct { Stats []ServerStats Error error }
type TalosClusterCellProvider ¶
type TalosClusterCellProvider struct {
// contains filtered or unexported fields
}
TalosClusterCellProvider creates a talos k8s cluster using cloudflare for DNS
func NewTalosClusterCellProvider ¶
func NewTalosClusterCellProvider(opts ...TalosClusterCellProviderOption) (*TalosClusterCellProvider, error)
func (*TalosClusterCellProvider) AdvanceDeployment ¶
func (p *TalosClusterCellProvider) AdvanceDeployment(ctx context.Context, cellId string, deployment *store.Deployment) (*AdvanceDeploymentResult, error)
func (*TalosClusterCellProvider) CreateCell ¶
func (p *TalosClusterCellProvider) CreateCell(ctx context.Context, opts CreateCellOptions) (*store.Cell, error)
CreateCell for a talos cluster creates a single-node talos cluster.
func (*TalosClusterCellProvider) DeploymentLogs ¶
func (p *TalosClusterCellProvider) DeploymentLogs(ctx context.Context, cellId string, deployment *store.Deployment, opts ...DeploymentLogsOption) ([]LogEntry, error)
func (*TalosClusterCellProvider) DeploymentLogsStream ¶
func (p *TalosClusterCellProvider) DeploymentLogsStream(ctx context.Context, cellId string, deployment *store.Deployment, opts ...DeploymentLogsOption) <-chan DeploymentLogsResult
func (*TalosClusterCellProvider) DestroyDeployments ¶
func (p *TalosClusterCellProvider) DestroyDeployments(ctx context.Context, cellId string, deployments []store.Deployment) error
func (*TalosClusterCellProvider) ServerStats ¶
func (p *TalosClusterCellProvider) ServerStats(ctx context.Context, cellId string) ([]ServerStats, error)
func (*TalosClusterCellProvider) ServerStatsStream ¶
func (p *TalosClusterCellProvider) ServerStatsStream(ctx context.Context, cellId string, interval time.Duration) <-chan ServerStatsResult
ServerStatsStream streams ServerStats at the specified interval
type TalosClusterCellProviderOption ¶
type TalosClusterCellProviderOption func(*TalosClusterCellProvider)
func WithCellStore ¶
func WithCellStore(cellStore store.CellStore) TalosClusterCellProviderOption
func WithDnsProvider ¶
func WithDnsProvider(dnsProvider dnsprovider.DNSProvider) TalosClusterCellProviderOption
func WithLogger ¶
func WithLogger(logger *slog.Logger) TalosClusterCellProviderOption
func WithServerStore ¶
func WithServerStore(serverStore store.ServerStore) TalosClusterCellProviderOption
func WithTmpDirRoot ¶
func WithTmpDirRoot(tmpDirRoot string) TalosClusterCellProviderOption
func WithTracerProvider ¶
func WithTracerProvider(tp *trace.TracerProvider) TalosClusterCellProviderOption
Click to show internal directories.
Click to hide internal directories.