config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfig

type ClusterConfig struct {
	// host:port for Temporal frontend service
	Address string `json:"address"`
	// Web UI Link
	WebAddress string `json:"webAddress"`
	// Temporal workflow namespace (default: "default")
	Namespace string `json:"namespace"`
	// Headers provider plugin executable name
	HeadersProvider string `json:"headersProvider"`
	// Data converter plugin executable name
	DataConverter string     `json:"dataConverter"`
	TLS           *TLSConfig `json:"tls,omitempty"`
	// Any additional environment variables that are needed
	Environment map[string]string `json:"additional,omitempty"`
}

func (ClusterConfig) GetTLS

func (c ClusterConfig) GetTLS() TLSConfig

type Config

type Config struct {
	ActiveContext string `json:"active"`
	// Map of context names to cluster configuration
	Contexts map[string]*ClusterConfig `json:"contexts"`
}

type FSReaderWriter

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

func NewReaderWriter

func NewReaderWriter(file string) (*FSReaderWriter, error)

func (*FSReaderWriter) DeleteContext

func (f *FSReaderWriter) DeleteContext(name string) error

func (*FSReaderWriter) GetActiveContext

func (f *FSReaderWriter) GetActiveContext() (*ClusterConfig, error)

func (*FSReaderWriter) GetActiveContextName

func (f *FSReaderWriter) GetActiveContextName() (string, error)

func (*FSReaderWriter) GetAllContexts

func (f *FSReaderWriter) GetAllContexts() (*Config, error)

func (*FSReaderWriter) GetContext

func (f *FSReaderWriter) GetContext(name string) (*ClusterConfig, error)

func (*FSReaderWriter) SetActiveContext

func (f *FSReaderWriter) SetActiveContext(name, namespace string) error

func (*FSReaderWriter) UpsertContext

func (f *FSReaderWriter) UpsertContext(name string, new *ClusterConfig) error

type TLSConfig

type TLSConfig struct {
	// Path to x509 certificate
	CertPath string `json:"certPath"`
	// Path to private key
	KeyPath string `json:"keyPath"`
	// Path to server CA certificate
	CACertPath string `json:"caPath"`
	// Disable tls host name verification (tls must be enabled)
	DisableHostVerification bool `json:"disableHostVerification"`
	// Override for target server name
	ServerName string `json:"serverName"`
}

Jump to

Keyboard shortcuts

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