server

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAPILocked = errors.New("another operation is currently running")
)

Functions

func Run

func Run(cliCtx *cli.Context, cliApp *cli.App, configPath string, clickhouseBackupVersion string) error

Run - expose CLI commands as REST API

Types

type APIServer

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

func (*APIServer) CreateIntegrationTables

func (api *APIServer) CreateIntegrationTables() error

func (*APIServer) GetMetrics

func (api *APIServer) GetMetrics() *metrics.APIMetrics

func (*APIServer) ReloadConfig

func (api *APIServer) ReloadConfig(w http.ResponseWriter, command string) (*config.Config, error)

func (*APIServer) Restart

func (api *APIServer) Restart() error

func (*APIServer) ResumeOperationsAfterRestart

func (api *APIServer) ResumeOperationsAfterRestart() error

func (*APIServer) RunWatch

func (api *APIServer) RunWatch(cliCtx *cli.Context)

func (*APIServer) Stop

func (api *APIServer) Stop() error

Stop cancel all running commands, @todo think about graceful period

func (*APIServer) UpdateBackupMetrics

func (api *APIServer) UpdateBackupMetrics(ctx context.Context, onlyLocal bool) error

type CallbackResponse

type CallbackResponse struct {
	Status string `json:"status"`
	Error  string `json:"error"`
}

CallbackResponse is the response that is returned to callers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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