admin

package
v0.0.83 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogStreamer

type LogStreamer interface {
	Stream(ctx context.Context, options config.LogStreamOptions) error
}

type NewLogStreamerFunc

type NewLogStreamerFunc func(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (LogStreamer, error)

type NewRemoterFunc

type NewRemoterFunc func(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (Remoter, error)

type NewStatuserFunc

type NewStatuserFunc func(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (Statuser, error)

type Provider

type Provider struct {
	NewStatuser    NewStatuserFunc
	NewRemoter     NewRemoterFunc
	NewLogStreamer NewLogStreamerFunc
}

type Providers

type Providers map[types.ModuleContractName]Provider

func (Providers) FindFactory

func (s Providers) FindFactory(curModule types.Module) *Provider

func (Providers) FindLogStreamer

func (s Providers) FindLogStreamer(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (LogStreamer, error)

func (Providers) FindRemoter

func (s Providers) FindRemoter(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (Remoter, error)

func (Providers) FindStatuser

func (s Providers) FindStatuser(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (Statuser, error)

type Remoter

type Remoter interface {
	// Exec allows a user to execute a command (usually tunneling) into a running service
	// This only makes sense for container-based providers
	Exec(ctx context.Context, task string, cmd string) error

	// Ssh allows a user to SSH into a running service
	Ssh(ctx context.Context, task string, forwards []config.PortForward) error
}

type StatusDetailReport

type StatusDetailReport struct {
	Name    string
	Records StatusRecords
}

type StatusDetailReports

type StatusDetailReports []StatusDetailReport

type StatusRecord

type StatusRecord struct {
	Fields []string
	Data   map[string]interface{}
}

type StatusRecords

type StatusRecords []StatusRecord

type StatusReport

type StatusReport struct {
	Fields []string
	Data   map[string]interface{}
}

type Statuser

type Statuser interface {
	// Status returns a high-level status report on the specified app env
	Status(ctx context.Context) (StatusReport, error)

	// StatusDetail returns a detailed status report on the specified app env
	StatusDetail(ctx context.Context) (StatusDetailReports, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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