provtarget

package
Version: v0.22.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure added in v0.13.0

func Configure(cfg *config.Config, log *logrus.Entry)

Configure allows the resolver to adjust configuration

func Name

func Name() string

Name is the name of the plugin used

func RegisterTargetResolver

func RegisterTargetResolver(r TargetResolver) error

RegisterTargetResolver registers a custom target resolver, else the default will be used

func Targets

func Targets(ctx context.Context, log *logrus.Entry) (srvcache.Servers, error)

Targets is a list of brokers to connect to

Types

type TargetResolver

type TargetResolver interface {
	// Name the display name that will be shown in places like `choria buildinfo`
	Name() string

	// Targets will be called to determine the provisioning destination
	Targets(context.Context, *logrus.Entry) []string

	// Configure will be called during server configuration and can be used to configure the target or adjust build settings or configuration
	// this will always be called even when not in provisioning mode, one can use this to programatically set a provisioner token for example
	Configure(*config.Config, *logrus.Entry)
}

TargetResolver is capable of resolving the target brokers for provisioning into list of strings in the format host:port

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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