Documentation
¶
Overview ¶
Package server implements the Klio backup server components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminServer ¶
type AdminServer struct {
Config *config.ServerConfig
Tier1KopiaConfigFile string
Tier2KopiaConfigFile string
SocketPath string
RunID string
RunSecret string
QueueURL string
}
AdminServer manages the Klio admin server lifecycle and configuration.
func (*AdminServer) Serve ¶
func (a *AdminServer) Serve(ctx context.Context) error
Serve starts the admin server and blocks until the context is canceled.
func (*AdminServer) String ¶
func (a *AdminServer) String() string
type BackupConsumer ¶
type BackupConsumer struct {
Config *config.ServerConfig
Tier1KopiaConfigFile string
Tier2KopiaConfigFile string
QueueURL string
RunID string
RunSecret string
}
BackupConsumer processes backup tasks from the queue. It runs whenever tier1 is enabled and performs the post-backup work for every backup: verification, plus the tier2 relay when tier2 is configured. Backup and WAL retention are handled independently by the periodic retention sweeper (internal/retention, server.RetentionSweeper), not here.
func (*BackupConsumer) Serve ¶
func (s *BackupConsumer) Serve(ctx context.Context) error
Serve starts the backup consumer and processes backup tasks from the queue.
func (*BackupConsumer) String ¶
func (s *BackupConsumer) String() string
type NatsService ¶
type NatsService struct {
// contains filtered or unexported fields
}
NatsService manages an embedded NATS server with JetStream for task queue operations.
func NewNatsService ¶
func NewNatsService(directory string) (*NatsService, error)
NewNatsService creates a new NATS server instance with JetStream enabled in the specified directory.
func (*NatsService) ClientURL ¶
func (s *NatsService) ClientURL() string
ClientURL returns the URL that clients should use to connect to this NATS server.
func (*NatsService) Serve ¶
func (s *NatsService) Serve(ctx context.Context) error
Serve starts the NATS server and waits for it to shut down.
func (*NatsService) String ¶
func (s *NatsService) String() string
type RetentionSweeper ¶
type RetentionSweeper struct {
Config *config.ServerConfig
Tier1KopiaConfigFile string
Tier2KopiaConfigFile string
QueueURL string
RunID string
RunSecret string
}
RetentionSweeper periodically lists every cluster's backups and deletes whatever is out of retention, for tier1 and (when configured) tier2. It runs whenever tier1 is enabled, alongside BackupConsumer.
func (*RetentionSweeper) Serve ¶
func (s *RetentionSweeper) Serve(ctx context.Context) error
Serve builds a retention.Sweeper and runs it on a fixed interval until ctx is done.
func (*RetentionSweeper) String ¶
func (s *RetentionSweeper) String() string
type Tier1KopiaServer ¶
type Tier1KopiaServer struct {
Config *config.ServerConfig
KopiaConfig string
RunID string
RunSecret string
}
Tier1KopiaServer manages the tier 1 Kopia server component.
func (*Tier1KopiaServer) Serve ¶
func (s *Tier1KopiaServer) Serve(ctx context.Context) error
Serve starts the tier 1 Kopia server and handles backup operations.
func (*Tier1KopiaServer) String ¶
func (s *Tier1KopiaServer) String() string
type Tier1WALServer ¶
type Tier1WALServer struct {
Config *config.ServerConfig
QueueURL string
}
Tier1WALServer manages the tier 1 WAL server component.
func (*Tier1WALServer) Serve ¶
func (s *Tier1WALServer) Serve(ctx context.Context) error
Serve starts the tier 1 WAL server and handles incoming requests.
func (*Tier1WALServer) String ¶
func (s *Tier1WALServer) String() string
type Tier2KopiaServer ¶
type Tier2KopiaServer struct {
Config *config.ServerConfig
KopiaConfig string
RunID string
RunSecret string
}
Tier2KopiaServer manages the tier 2 Kopia server component.
func (*Tier2KopiaServer) Serve ¶
func (s *Tier2KopiaServer) Serve(ctx context.Context) error
Serve starts the tier 2 Kopia server and handles backup operations.
func (*Tier2KopiaServer) String ¶
func (s *Tier2KopiaServer) String() string
type Tier2WALConsumer ¶
type Tier2WALConsumer struct {
Config *config.ServerConfig
QueueURL string
}
Tier2WALConsumer manages the tier 2 WAL consumer that processes WAL tasks from the queue.
func (*Tier2WALConsumer) Serve ¶
func (s *Tier2WALConsumer) Serve(ctx context.Context) error
Serve starts the tier 2 WAL consumer and processes WAL tasks from the queue.
func (*Tier2WALConsumer) String ¶
func (s *Tier2WALConsumer) String() string
type Tier2WALServer ¶
type Tier2WALServer struct {
Config *config.ServerConfig
QueueURL string
}
Tier2WALServer manages the tier 2 WAL server component.
func (*Tier2WALServer) Serve ¶
func (s *Tier2WALServer) Serve(ctx context.Context) error
Serve starts the tier 2 WAL server and handles incoming requests.
func (*Tier2WALServer) String ¶
func (s *Tier2WALServer) String() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin implements the Klio administration server.
|
Package admin implements the Klio administration server. |
|
Package kopiaconfig provides utilities for creating and managing Kopia configuration files.
|
Package kopiaconfig provides utilities for creating and managing Kopia configuration files. |
|
Package kopiaserver implements the Kopia server
|
Package kopiaserver implements the Kopia server |
|
Package walserver implements the Klio server infrastructure
|
Package walserver implements the Klio server infrastructure |