app

package
v0.0.0-...-fbb851a Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
View Source
const ForwarderUsage = `` /* 657-byte string literal not displayed */

Variables

This section is empty.

Functions

func RemovePIDFile

func RemovePIDFile(pidfile string)

func WritePIDFile

func WritePIDFile(pidfile string) error

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Branch  string
	Time    string
}

BuildInfo represents the build details for the server code.

type Command

type Command struct {
	Usage string

	Pidfile       string
	Closed        chan struct{}
	Logger        *logger.Logger
	Command       *cobra.Command
	ServiceName   string
	Server        Server
	Config        *conf.Config
	NewServerFunc func(conf.Config, *cobra.Command, *logger.Logger) (Server, error)
	// contains filtered or unexported fields
}

Command represents the command executed by "ts-xxx run".

func NewCommand

func NewCommand() *Command

func (*Command) Close

func (cmd *Command) Close() error

func (*Command) InitConfig

func (cmd *Command) InitConfig(c *conf.Config, path string) error

type Options

type Options struct {
	ConfigPath string
	PIDFile    string
	Join       string
	Hostname   string
}

Options represents the command line options that can be parsed.

func ParseFlags

func ParseFlags(usage func(), args ...string) (Options, error)

func (*Options) GetConfigPath

func (opt *Options) GetConfigPath() string

type Server

type Server interface {
	Open() error
	Close() error
	Err() <-chan error
}

Directories

Path Synopsis
run

Jump to

Keyboard shortcuts

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