config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemoryBrokerImage = "gcr.io/triggermesh/memory-broker"
	RedisBrokerImage  = "gcr.io/triggermesh/redis-broker"

	// TriggerMesh DockerHub Registry
	DockerRegistry = "triggermesh"
)

Variables

This section is empty.

Functions

func Get

func Get(key string) (string, error)

func HomeAbsPath

func HomeAbsPath() string

func Set

func Set(key, value string) error

Types

type BrokerConfig

type BrokerConfig struct {
	Image   string                `yaml:"image,omitempty"` // deprecated
	Version string                `yaml:"version"`
	Memory  *InMemoryBrokerConfig `yaml:"memory,omitempty"`
	Redis   *RedisBrokerConfig    `yaml:"redis,omitempty"`
	// for Windows only
	ConfigPollingPeriod string `yaml:"config-polling-period,omitempty"`
}

type Config

type Config struct {
	// Calculated attributes
	ConfigHome string `yaml:"-"`

	// Persisted attributes
	Context     string   `yaml:"context"`
	Triggermesh TmConfig `yaml:"triggermesh"`
	Docker      Docker   `yaml:"docker"`
}

func New

func New() (*Config, error)

func (*Config) Save

func (c *Config) Save() error

type Docker

type Docker struct {
	StartTimeout string `yaml:"timeout"`
}

type InMemoryBrokerConfig

type InMemoryBrokerConfig struct {
	BufferSize     string `yaml:"buffer-size"`
	ProduceTimeout string `yaml:"produce-timeout"`
}

type RedisBrokerConfig

type RedisBrokerConfig struct {
	Address    string `yaml:"address"`
	Username   string `yaml:"username"`
	Password   string `yaml:"password"`
	TLSEnabled bool   `yaml:"tls-enabled,omitempty"`
	SkipVerify bool   `yaml:"skip-verify,omitempty"`
}

type TmConfig

type TmConfig struct {
	ComponentsVersion string       `yaml:"version"`
	Broker            BrokerConfig `yaml:"broker"`
}

Jump to

Keyboard shortcuts

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