Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Debug mode
	Debug = "DEBUG"
	// MongoDBHost ...
	MongoDBHost = "MONGODB_HOST"
	// KafkaHost ...
	KafkaHost = "KAFKA_HOST"
	// CloudAutoDiscovery ...
	CloudAutoDiscovery = "CLOUD_AUTO_DISCOVERY"
)

api server env

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Config        *APIServerOptions
	WorkerOptions *cloud.WorkerOptions
	// contains filtered or unexported fields
}

APIServer ...

func (*APIServer) InitLog

func (s *APIServer) InitLog()

InitLog initializes log

func (*APIServer) PrepareRun

func (s *APIServer) PrepareRun() (*PreparedAPIServer, error)

PrepareRun prepare for apiserver running

type APIServerOptions

type APIServerOptions struct {
	MongoDBHost         string
	KafkaHost           string
	MongoGracePeriod    time.Duration
	CyclonePort         int
	CycloneAddrTemplate string
	ShowAPIDoc          bool
	Debug               bool
	CloudAutoDiscovery  bool
	LogForceColor       bool
}

APIServerOptions contains all options(config) for api server

func NewAPIServerOptions

func NewAPIServerOptions() *APIServerOptions

NewAPIServerOptions returns a new APIServerOptions

func (*APIServerOptions) AddFlags

func (opts *APIServerOptions) AddFlags(app *cli.App)

AddFlags adds flags to cli.App

type PreparedAPIServer

type PreparedAPIServer struct {
	*APIServer
}

PreparedAPIServer is a prepared api server

func (*PreparedAPIServer) Run

func (s *PreparedAPIServer) Run(stopCh <-chan struct{}) error

Run start a api server

func (*PreparedAPIServer) StartLogServer

func (s *PreparedAPIServer) StartLogServer()

StartLogServer run a http log server and a websocket server

Jump to

Keyboard shortcuts

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