orchestration

package
v0.0.0-...-f274180 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MetricsNamespace = "cloudflared"
	MetricsSubsystem = "orchestration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Ingress      *ingress.Ingress
	WarpRouting  ingress.WarpRoutingConfig
	WriteTimeout time.Duration

	// Extra settings used to configure this instance but that are not eligible for remotely management
	// ie. (--protocol, --loglevel, ...)
	ConfigurationFlags map[string]string
}

Config is the original config as read and parsed by cloudflared.

type Orchestrator

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

Orchestrator manages configurations, so they can be updatable during runtime properties are static, so it can be read without lock currentVersion and config are read/write infrequently, so their access are synchronized with RWMutex access to proxy is synchronized with atomic.Value, because it uses copy-on-write to provide scalable frequently read when update is infrequent

func NewOrchestrator

func NewOrchestrator(ctx context.Context,
	config *Config,
	tags []tunnelpogs.Tag,
	internalRules []ingress.Rule,
	log *zerolog.Logger) (*Orchestrator, error)

func (*Orchestrator) GetConfigJSON

func (o *Orchestrator) GetConfigJSON() ([]byte, error)

GetConfigJSON returns the current json serialization of the config as the edge understands it

func (*Orchestrator) GetOriginProxy

func (o *Orchestrator) GetOriginProxy() (connection.OriginProxy, error)

GetOriginProxy returns an interface to proxy to origin. It satisfies connection.ConfigManager interface

func (*Orchestrator) GetVersionedConfigJSON

func (o *Orchestrator) GetVersionedConfigJSON() ([]byte, error)

GetVersionedConfigJSON returns the current version and configuration as JSON

func (*Orchestrator) UpdateConfig

func (o *Orchestrator) UpdateConfig(version int32, config []byte) *tunnelpogs.UpdateConfigurationResponse

UpdateConfig creates a new proxy with the new ingress rules

Jump to

Keyboard shortcuts

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