config

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustExistsEnv

func MustExistsEnv(key string) error

func SetConfigFile

func SetConfigFile(filename string)

Types

type BindingConfig

type BindingConfig struct {
	Name       string         `json:"name"`
	Source     Spec           `json:"source"`
	Target     Spec           `json:"target"`
	Properties types.Metadata `json:"properties"`
}

func (BindingConfig) Validate

func (b BindingConfig) Validate() error

type Config

type Config struct {
	Bindings []BindingConfig `json:"bindings" yaml:"bindings"`
	ApiPort  int             `json:"apiPort" yaml:"apiPort"`
	LogLevel string          `json:"logLevel" yaml:"logLevel"`
}

func Load

func Load(cfgCh chan *Config) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Spec

type Spec struct {
	Name       string         `json:"-"`
	Kind       string         `json:"kind"`
	Properties types.Metadata `json:"properties"`
}

func (Spec) Validate

func (s Spec) Validate() error

Jump to

Keyboard shortcuts

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