ctrl

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package ctrl converts Settings CRD into a bootstrap config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, dst *config.Options, src *model.Config) error

Apply prepares a minimal bootstrap configuration for Pomerium

Types

type InMemoryConfigSource

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

InMemoryConfigSource represents bootstrap config source

func (*InMemoryConfigSource) GetConfig

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

GetConfig implements config.Source

func (*InMemoryConfigSource) OnConfigChange

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

OnConfigChange implements config.Source

func (*InMemoryConfigSource) SetConfig

func (src *InMemoryConfigSource) SetConfig(ctx context.Context, cfg *config.Config) bool

SetConfig updates the underlying configuration it returns true if configuration was updated and informs config change listeners in case there was a change

type Runner

type Runner struct {
	sync.Once
	// contains filtered or unexported fields
}

Runner implements pomerium control loop

func NewPomeriumRunner

func NewPomeriumRunner(base config.Config, listener config.ChangeListener) (*Runner, error)

NewPomeriumRunner creates new pomerium command and control

func (*Runner) GetConfig

func (r *Runner) GetConfig() *config.Config

GetConfig returns current configuration snapshot

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run starts pomerium once config is available

func (*Runner) SetConfig

func (r *Runner) SetConfig(ctx context.Context, src *model.Config) (changes bool, err error)

SetConfig updates just the shared config settings

Jump to

Keyboard shortcuts

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