command

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunCmdConfigTestCallback func(*config.Settings)
View Source
var RunCmdTestCallback func()

Functions

func ContextWithSignal

func ContextWithSignal(ctx context.Context) context.Context

ContextWithSignal creates a context canceled when SIGINT or SIGTERM are notified

func Synopsis

func Synopsis()

Synopsis shows available commands and options.

Types

type Args

type Args []string

func NewArgs

func NewArgs(args []string) Args

func (Args) Filter

func (a Args) Filter(set *flag.FlagSet) Args

Filter returns all command line arguments which will match the given flag.FlagSet.

type Cmd

type Cmd interface {
	Execute(args Args, config *config.Couper, logger *logrus.Entry) error
	Usage()
}

func NewCommand

func NewCommand(ctx context.Context, cmd string) Cmd

type Help

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

func NewHelp

func NewHelp(ctx context.Context) *Help

func (Help) Execute

func (h Help) Execute(args Args, _ *config.Couper, _ *logrus.Entry) error

func (Help) Usage

func (h Help) Usage()

type Run

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

Run starts the frontend gateway server and listen for requests on the configured hosts and ports.

func NewRun

func NewRun(ctx context.Context) *Run

func (*Run) Execute

func (r *Run) Execute(args Args, config *config.Couper, logEntry *logrus.Entry) error

func (*Run) Usage

func (r *Run) Usage()

type Verify

type Verify struct{}

func NewVerify

func NewVerify() *Verify

func (Verify) Execute

func (v Verify) Execute(args Args, conf *config.Couper, logger *logrus.Entry) error

func (Verify) Usage

func (v Verify) Usage()

type Version

type Version struct{}

func NewVersion

func NewVersion() *Version

func (Version) Execute

func (v Version) Execute(_ Args, _ *config.Couper, _ *logrus.Entry) error

func (Version) Usage

func (v Version) Usage()

Jump to

Keyboard shortcuts

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