config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Subscription string                    `mapstructure:"subscription"`
	SyncTopic    pulsarconnector.TopicName `mapstructure:"syncTopic"`
	Topic        pulsarconnector.TopicName `mapstructure:"topic"`
}

type Config

type Config struct {
	Backend   Backend    `mapstructure:"backend"`
	InCluster InCluster  `mapstructure:"inCluster"`
	Resources []Resource `mapstructure:"resources"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig reads configuration from file or environment variables.

type InCluster

type InCluster struct {
	BackendUrl  string `mapstructure:"backendUrl"`
	ClusterName string `mapstructure:"clusterName"`
	Account     string `mapstructure:"account"`
	AccessKey   string `mapstructure:"accessKey"`
}

type Resource

type Resource struct {
	Group    string          `mapstructure:"group"`
	Version  string          `mapstructure:"version"`
	Resource string          `mapstructure:"resource"`
	Strategy domain.Strategy `mapstructure:"strategy"`
}

func (Resource) String

func (r Resource) String() string

Kind returns group/version/resource as a string.

Jump to

Keyboard shortcuts

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