app

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFlags = []cli.Flag{
		&cli.StringFlag{
			Name:    "env",
			EnvVars: []string{"env"},
			Usage:   "set up the environment",
		},
	}
)
View Source
var (
	Opt = Options{}
)

Functions

func Run

func Run(app Server) error

Types

type App

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

func NewApp

func NewApp(opts ...Option) *App

func (*App) AddFlags

func (a *App) AddFlags(flags []cli.Flag)

func (*App) Init

func (a *App) Init(opts ...Option) error

func (*App) Options

func (a *App) Options() Options

func (*App) Stop

func (a *App) Stop() error

type Option

type Option func(*Options)

type Options

type Options struct {
	ServerID string
	Cli      cli.App
}

type Server

type Server interface {
	Start() error
	Stop() error
}

Jump to

Keyboard shortcuts

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