server

package
v1.1.1-0...-dcff8be Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorIncorrectMode indicates that the given mode is not correct.
	ErrorIncorrectMode = "incorrect mode"

	// ProductionMode runs the server in production mode.
	ProductionMode = Mode("production")

	// DevelopmentMode runs the server in development mode.
	DevelopmentMode = Mode("development")

	// DefaultMode to use if none is specified.
	DefaultMode = DevelopmentMode
)
View Source
const (
	ErrorIncorrectConfiguration = "incorrect configuration"
)

Variables

This section is empty.

Functions

func Run

func Run(port, localVitessPath string) error

func SetSLogger

func SetSLogger(newSlog *zap.SugaredLogger)

SetSLogger sets the *zap.SugaredLogger of this package.

Types

type CompareMacrobench

type CompareMacrobench struct {
	Type   string                               `json:"type"`
	Result macrobench.StatisticalCompareResults `json:"result"`
}

type ErrorAPI

type ErrorAPI struct {
	Error string `json:"error"`
}

type Mode

type Mode string

Mode defines the type of mode on which to run the server. Either testing, development, or production.

func (*Mode) Set

func (m *Mode) Set(s string) error

Set implements Cobra flag.Value interface.

func (*Mode) String

func (m *Mode) String() string

String implements Cobra flag.Value interface.

func (*Mode) Type

func (m *Mode) Type() string

Type implements Cobra flag.Value interface.

type RecentExecutions

type RecentExecutions struct {
	UUID          string     `json:"uuid"`
	Source        string     `json:"source"`
	GitRef        string     `json:"git_ref"`
	Status        string     `json:"status"`
	TypeOf        string     `json:"type_of"`
	PullNb        int        `json:"pull_nb"`
	GolangVersion string     `json:"golang_version"`
	StartedAt     *time.Time `json:"started_at"`
	FinishedAt    *time.Time `json:"finished_at"`
}

type Server

type Server struct {

	// Mode used to run the server.
	Mode
	// contains filtered or unexported fields
}

func (*Server) AddToCommand

func (s *Server) AddToCommand(cmd *cobra.Command)

func (*Server) Init

func (s *Server) Init() error

func (*Server) Run

func (s *Server) Run() error

type VitessGitRef

type VitessGitRef struct {
	UUID          string     `json:"uuid"`
	Source        string     `json:"source"`
	GitRef        string     `json:"git_ref"`
	Status        string     `json:"status"`
	TypeOf        string     `json:"type_of"`
	PullNb        int        `json:"pull_nb"`
	GolangVersion string     `json:"golang_version"`
	StartedAt     *time.Time `json:"started_at"`
	FinishedAt    *time.Time `json:"finished_at"`
}

Jump to

Keyboard shortcuts

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