cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executes the root command.

func GetLogger

func GetLogger() (*zap.Logger, *zap.AtomicLevel, error)

GetLogger will return a logger.

Types

type Main

type Main struct {
	// contains filtered or unexported fields
}

Main is the main server for Bytebase.

func NewMain

func NewMain(activeProfile Profile, logger *zap.Logger) (*Main, error)

NewMain creates a main server based on profile.

func (*Main) Close

func (m *Main) Close() error

Close gracefully stops the program.

func (*Main) GetServer

func (m *Main) GetServer() *server.Server

GetServer returns the server in main.

func (*Main) Run

func (m *Main) Run(ctx context.Context) error

Run will run the main server.

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

Profile is the configuration to start main server.

func GetTestProfile

func GetTestProfile(dataDir string, port, datastorePort int) Profile

GetTestProfile will return a profile for testing.

Jump to

Keyboard shortcuts

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