cli

package
v0.0.0-...-5f09953 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

func ConfigPath

func ConfigPath() string

func SocketPath

func SocketPath() string

func WithState

func WithState(ctx context.Context, state *GlobalState) context.Context

func WriteConfig

func WriteConfig(cfg *Config, configPath string) error

Types

type Config

type Config struct {
	DebugAWS      bool   `json:"-"`
	Store         string `json:"object_store"`
	Region        string `json:"aws_region"`
	ECRRepository string `json:"ecr_repository"`
	IAMRole       string `json:"iam_role"`
	S3Concurrency int    `json:"s3_concurrency"`
	Honeycomb     struct {
		APIKey  string `json:"api_key,omitempty"`
		Dataset string `json:"dataset,omitempty"`
	} `json:"honeycomb,omitempty"`
}

func ReadConfig

func ReadConfig(configPath string) (*Config, error)

type GlobalState

type GlobalState struct {
	Config *Config
	// contains filtered or unexported fields
}

func GetState

func GetState(ctx context.Context) (*GlobalState, bool)

func MustState

func MustState(ctx context.Context) *GlobalState

func (*GlobalState) MustSession

func (g *GlobalState) MustSession() *session.Session

func (*GlobalState) MustStore

func (g *GlobalState) MustStore() store.Store

func (*GlobalState) Session

func (g *GlobalState) Session() (*session.Session, error)

func (*GlobalState) Store

func (g *GlobalState) Store() (store.Store, error)

Jump to

Keyboard shortcuts

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