bootstrap

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FallbackStrategy

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

FallbackStrategy implements bootstrapping from Server then S3 Backup if Server fails.

func NewFallbackStrategy

func NewFallbackStrategy(server Strategy, s3Backup Strategy) *FallbackStrategy

NewFallbackStrategy creates a new FallbackStrategy.

func (*FallbackStrategy) Bootstrap

func (s *FallbackStrategy) Bootstrap(ctx context.Context, namespaces []string) (*Result, error)

Bootstrap attempts to load from Server, falling back to S3 Backup on failure.

type HybridStrategy

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

HybridStrategy implements bootstrapping from S3Backup then Server.

func NewHybridStrategy

func NewHybridStrategy(backup Strategy, server Strategy, tr transport.Transport, environmentID string) *HybridStrategy

NewHybridStrategy creates a new HybridStrategy.

func (*HybridStrategy) Bootstrap

func (s *HybridStrategy) Bootstrap(ctx context.Context, namespaces []string) (*Result, error)

Bootstrap loads from S3Backup, identifies missing namespaces, fetches them from Server, and catches up.

func (*HybridStrategy) String added in v0.2.6

func (s *HybridStrategy) String() string

type Result

type Result struct {
	FigFamilies []model.FigFamily
	Cursors     map[string]string
	Schemas     map[string]string
}

Result holds the result of a bootstrap operation.

type S3BackupStrategy added in v0.3.0

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

S3BackupStrategy implements bootstrapping from the FigChain S3Backup (S3).

func NewS3BackupStrategy added in v0.3.0

func NewS3BackupStrategy(vs *backup.S3BackupService) *S3BackupStrategy

NewS3BackupStrategy creates a new S3BackupStrategy.

func (*S3BackupStrategy) Bootstrap added in v0.3.0

func (s *S3BackupStrategy) Bootstrap(ctx context.Context, namespaces []string) (*Result, error)

Bootstrap loads data from the S3Backup.

func (*S3BackupStrategy) String added in v0.3.0

func (s *S3BackupStrategy) String() string

type ServerStrategy

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

ServerStrategy implements bootstrapping from the FigChain API.

func NewServerStrategy

func NewServerStrategy(tr transport.Transport, environmentID string, asOf string) *ServerStrategy

NewServerStrategy creates a new ServerStrategy.

func (*ServerStrategy) Bootstrap

func (s *ServerStrategy) Bootstrap(ctx context.Context, namespaces []string) (*Result, error)

Bootstrap fetches initial data from the server.

type Strategy

type Strategy interface {
	Bootstrap(ctx context.Context, namespaces []string) (*Result, error)
}

Strategy defines the interface for bootstrapping the client.

Jump to

Keyboard shortcuts

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