config

package
v0.0.0-...-1cb3484 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config contains structs to hold eks connector configurations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivationConfig

type ActivationConfig struct {
	Code string `mapstructure:"code"`
	ID   string `mapstructure:"id"`
}

ActivationConfig is the sub-configuration for ssm agent activation.

type AgentConfig

type AgentConfig struct {
	// Region is the AWS region code that ssm agent will connect to.
	Region string `mapstructure:"region"`

	// Endpoint is the endpoint that ssm agent will connect to.
	// If not set, ssm agent will connect to the default endpoint of the region.
	Endpoint string `mapstructure:"endpoint"`
}

AgentConfig is the sub-configuration for ssm agent.

type Config

type Config struct {
	AgentConfig      *AgentConfig      `mapstructure:"agent"`
	ProxyConfig      *ProxyConfig      `mapstructure:"proxy"`
	WatcherConfig    *WatcherConfig    `mapstructure:"watcher"`
	ActivationConfig *ActivationConfig `mapstructure:"activation"`
	StateConfig      *StateConfig      `mapstructure:"state"`
}

Config is the whole configuration of eks-connector.

type MockProvider

type MockProvider struct {
	mock.Mock
}

MockProvider is an autogenerated mock type for the Provider type

func (*MockProvider) Get

func (_m *MockProvider) Get() (*Config, error)

Get provides a mock function with given fields:

type Provider

type Provider interface {
	Get() (*Config, error)
}

func NewProvider

func NewProvider(v *viper.Viper) Provider

type ProxyConfig

type ProxyConfig struct {
	SocketType    SocketType `mapstructure:"socketType"`
	SocketAddress string     `mapstructure:"socketAddr"`

	TargetHost     string `mapstructure:"targetHost"`
	TargetProtocol string `mapstructure:"targetProtocol"`
}

ProxyConfig is the sub-configuration for api server proxy.

type SocketType

type SocketType string
const (
	TCP  SocketType = "tcp"
	Unix SocketType = "unix"
)

type StateConfig

type StateConfig struct {
	// BaseDir is the SSM agent Vault dir that contains SSM agent state.
	BaseDir string `mapstructure:"baseDir"`
	// SecretNamePrefix is the prefix of secret name that contains EKS connector state.
	// EKS connector Pod ordinal index in StatefulSet is appended.
	SecretNamePrefix string `mapstructure:"secretNamePrefix"`
	// SecretNamespace is the namespace of secret that container EKS connector state.
	SecretNamespace string `mapstructure:"secretNamespace"`
}

StateConfig is the sub-configuration for storing states of EKS connector.

type WatcherConfig

type WatcherConfig struct {
}

WatcherConfig is the sub-configuration for ssm agent watcher.

Jump to

Keyboard shortcuts

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