bootstrap

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package bootstrap fetches the very initial configuration for Pomerium Core to start.

Index

Constants

View Source
const (
	// DefaultCheckForUpdateIntervalWhenDisconnected is the default interval to check for updates
	// if there is no connection to the update service
	DefaultCheckForUpdateIntervalWhenDisconnected = 5 * time.Minute
	// DefaultCheckForUpdateIntervalWhenConnected is the default interval to check for updates
	// if there is a connection to the update service
	DefaultCheckForUpdateIntervalWhenConnected = time.Hour
)

Variables

This section is empty.

Functions

func LoadBootstrapConfigFromFile

func LoadBootstrapConfigFromFile(fp string, cipher cipher.AEAD) (*cluster_api.BootstrapConfig, error)

LoadBootstrapConfigFromFile loads the bootstrap configuration from a file.

func SaveBootstrapConfigToFile

func SaveBootstrapConfigToFile(src *cluster_api.BootstrapConfig, fp string, cipher cipher.AEAD) error

SaveBootstrapConfigToFile saves the bootstrap configuration to a file.

Types

type Source

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

Source is a base config layer for Pomerium

func New

func New(secret []byte) (*Source, error)

New creates a new bootstrap config source

func (*Source) GetConfig

func (src *Source) GetConfig() *config.Config

GetConfig implements config.Source

func (*Source) OnConfigChange

func (src *Source) OnConfigChange(_ context.Context, l config.ChangeListener)

OnConfigChange implements config.Source

func (*Source) Run

func (svc *Source) Run(
	ctx context.Context,
	api *sdk.API,
	fileCachePath string,
) error

Run initializes the bootstrap config source

func (*Source) UpdateBootstrap

func (src *Source) UpdateBootstrap(ctx context.Context, cfg cluster_api.BootstrapConfig) bool

UpdateBootstrap updates the underlying configuration options

func (*Source) WaitReady

func (src *Source) WaitReady(ctx context.Context) error

Jump to

Keyboard shortcuts

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