app

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
View Source
View Source
const MainUsage = `` /* 339-byte string literal not displayed */
View Source
const RunUsage = `` /* 175-byte string literal not displayed */
View Source
View Source
View Source
const TSSERVER = `` /* 517-byte string literal not displayed */
View Source
const VERSION = `openGemini version info:
%s: %s
git: HEAD %s
os: %s
arch: %s
`

Variables

This section is empty.

Functions

func CreateSerfInstance

func CreateSerfInstance(conf *serf.Config, clock uint64, members []string, preNodes []*serf.PreviousNode) (*serf.Serf, error)

func HideQueryPassword

func HideQueryPassword(url string) string

func InitParse added in v1.0.1

func InitParse()

InitParse inits the command line parse flogs

func IsSingle

func IsSingle() bool

func RemovePIDFile

func RemovePIDFile(pidfile string)

func SetStatsResponse added in v1.0.0

func SetStatsResponse(pusher *statisticsPusher.StatisticsPusher, w http.ResponseWriter, r *http.Request)

func SwitchToSingle

func SwitchToSingle()

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        config.Config
	NewServerFunc func(config.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(conf config.Config, path string) error

func (*Command) Run

func (cmd *Command) Run(args ...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)

type Server

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

Jump to

Keyboard shortcuts

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