funcli

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CliConfig added in v0.4.1

type CliConfig struct {
	ConnectConfig *ConnectConfig `arg:"subcommand:connect" help:"Connect to a funcie deployment to allow local development."`
	InitConfig    *InitConfig    `arg:"subcommand:init" help:"Initialize a new funcie deployment."`
	DestroyConfig *DestroyConfig `arg:"subcommand:destroy" help:"Destroy an existing funcie deployment."`

	Environment string `arg:"--env" help:"Funcie environment used if multiple deployments are present." default:"default"`
	Region      string `arg:"env:AWS_REGION" help:"AWS region to use for deployments; otherwise uses the default AWS CLI region."`
	// contains filtered or unexported fields
}

CliConfig provides user input parameters specific to the CLI tool.

func NewCliConfig added in v0.4.1

func NewCliConfig(version string) *CliConfig

func (*CliConfig) Version added in v0.4.1

func (c *CliConfig) Version() string

type ConfigStore

type ConfigStore interface {
	// GetConfigValue retrieves the value of a configuration key.
	GetConfigValue(ctx context.Context, key string) (string, error)
}

ConfigStore retrieves dynamic configuration values on-demand.

func NewConfigStore

func NewConfigStore(config *CliConfig, ssmClient funcAws.SsmClient) ConfigStore

NewConfigStore creates a new ConfigStore.

type ConnectCommand

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

func NewConnectCommand

func NewConnectCommand(
	cliConfig *CliConfig,
	configStore ConfigStore,
	connectClient aws2.SsmClient,
	tunneller Tunneller,
	connectivityService ConnectivityService,
) *ConnectCommand

func (*ConnectCommand) Run

func (c *ConnectCommand) Run(ctx context.Context) error

type ConnectConfig added in v0.4.1

type ConnectConfig struct {
	RemoteHost string `arg:"--remote-host,-r" help:"Override the remote host to connect to instead of the Redis default."`
	RemotePort int    `arg:"--remote-port,-p" help:"Override the remote port to bind to." default:"6379"`
	LocalPort  int    `arg:"--local-port,-l" help:"Override the local port to bind to." default:"6379"`
}

type ConnectivityService

type ConnectivityService interface {
	// WaitForConnectivity waits for the given endpoint to be reachable, or the context to be done.
	WaitForConnectivity(ctx context.Context, endpoint string) error
}

ConnectivityService provides utilities for testing / awaiting internet connectivity.

func NewHttpConnectivityService

func NewHttpConnectivityService(opts ...HttpConnectivityServiceOptionSetter) ConnectivityService

NewHttpConnectivityService creates a new HttpConnectivityService with optional settings.

type DestroyCommand added in v0.5.0

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

func NewDestroyCommand added in v0.5.0

func NewDestroyCommand(
	cliConfig *CliConfig,
	terraformClient tools.TerraformClient,
) *DestroyCommand

func (*DestroyCommand) Run added in v0.5.0

func (c *DestroyCommand) Run(ctx context.Context) error

type DestroyConfig added in v0.5.0

type DestroyConfig struct {
}

type HttpConnectivityServiceOptionSetter

type HttpConnectivityServiceOptionSetter func(*HttpConnectivityServiceOptions)

func WithRetryInterval

func WithRetryInterval(interval time.Duration) HttpConnectivityServiceOptionSetter

WithRetryInterval sets the retry interval for the HttpConnectivityService.

type HttpConnectivityServiceOptions

type HttpConnectivityServiceOptions struct {
	RetryInterval time.Duration
}

type InitCommand added in v0.5.0

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

func NewInitCommand added in v0.5.0

func NewInitCommand(
	cliConfig *CliConfig,
	resourceList aws.ResourceLister,
	gitClient tools.GitClient,
	terraformClient tools.TerraformClient,
) *InitCommand

func (*InitCommand) Run added in v0.5.0

func (c *InitCommand) Run(ctx context.Context) error

type InitConfig added in v0.5.0

type InitConfig struct {
}

type SsmTunnellerOptions added in v0.4.2

type SsmTunnellerOptions struct {
	// Output is the output of the StartSession API call.
	Output *ssm.StartSessionOutput
	// InstanceID is the EC2 instance ID of the target instance.
	InstanceID string
}

SsmTunnellerOptions contains the options for OpenTunnel using SSM.

type TerraformVars added in v0.5.0

type TerraformVars struct {
	VpcId          string   `yaml:"vpc_id"`
	PrivateSubnets []string `yaml:"private_subnet_ids"`
	PublicSubnets  []string `yaml:"public_subnet_ids"`
	RedisHost      string   `yaml:"redis_host"`
	Region         string   `yaml:"region"`
}

type Tunneller

type Tunneller interface {
	// OpenTunnel starts a tunnel to a remote host using the provider-specific options.
	OpenTunnel(ctx context.Context, opts interface{}) error
}

Tunneller is an interface for creating a tunnel to a remote host.

func NewSsmTunneller added in v0.4.2

func NewSsmTunneller(conf *CliConfig) Tunneller

NewSsmTunneller creates a new WebhookTunnel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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