oci

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery added in v0.2.4

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

Discovery periodically performs OCI-SD requests. It implements the Discoverer interface.

func NewDiscovery

func NewDiscovery(conf *SDConfig, logger *log.Logger) (*Discovery, error)

NewDiscovery returns a new OCI discovery which periodically refreshes its targets.

func (*Discovery) Run added in v0.2.4

func (d *Discovery) Run(ctx context.Context, ch chan<- []*targetgroup.Group)

Run implements the Discoverer interface.

type SDConfig

type SDConfig struct {
	User              string
	FingerPrint       string
	KeyFile           string
	PassPhrase        string `toml:",omitempty"`
	Tenancy           string
	Region            string
	Compartment       string
	Port              int            `toml:",omitempty"`
	RefreshInterval   model.Duration `toml:",omitempty"`
	InstancePrincipal bool
	Sanitise          bool
}

SDConfig is the configuration for OCI based service discovery.

func (*SDConfig) ApplyDefault

func (c *SDConfig) ApplyDefault() error

ApplyDefault function applies default values to the optional fields of the SDConfig struct if these are not provided.

func (*SDConfig) Validate

func (c *SDConfig) Validate() error

Validate function validates that the SDConfig struct contains all the mandatory fields

Jump to

Keyboard shortcuts

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