server

package
v0.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MongoDBHost ...
	MongoDBHost = "MONGODB_HOST"
	// SaltKey ...
	SaltKey = "SALT_KEY"
	// CloudAutoDiscovery ...
	CloudAutoDiscovery = "CLOUD_AUTO_DISCOVERY"
	// RecordLogRotationThreshold ...
	RecordRotationThreshold = "RECORD_ROTATION_THRESHOLD"
	// NotificationURL ...
	NotificationURL = "NOTIFICATION_URL"
	// RecordWebURLTemplate is a customer's pipeline record website URL address template.
	RecordWebURLTemplate = "RECORD_WEB_URL_TEMPLATE"
)

api server env

View Source
const (
	DefaultPort = 7099
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Config        *APIServerOptions
	WorkerOptions *options.WorkerOptions
}

APIServer ...

func (*APIServer) PrepareRun

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

PrepareRun prepare for apiserver running

type APIServerOptions

type APIServerOptions struct {
	MongoDBHost             string
	SaltKey                 string
	MongoGracePeriod        time.Duration
	CyclonePort             int
	CycloneAddrTemplate     string
	ShowAPIDoc              bool
	CloudAutoDiscovery      bool
	RecordRotationThreshold int
	NotificationURL         string
	RecordWebURLTemplate    string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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