server

package
v1.0.1-0...-b7751fa Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APITimeFormat - clickhouse compatibility time format
	APITimeFormat = "2006-01-02 15:04:05"
)

Variables

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

Functions

func Server

func Server(c *cli.App, cfg *config.Config) error

Server - expose CLI commands as REST API

Types

type APIServer

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

type AsyncStatus

type AsyncStatus struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type CommandInfo

type CommandInfo struct {
	Command  string `json:"command"`
	Status   string `json:"status"`
	Progress string `json:"progress,omitempty"`
	Start    string `json:"start,omitempty"`
	Finish   string `json:"finish,omitempty"`
	Error    string `json:"error,omitempty"`
}

type Metrics

type Metrics struct {
	LastBackupSuccess  prometheus.Gauge
	LastBackupStart    prometheus.Gauge
	LastBackupEnd      prometheus.Gauge
	LastBackupDuration prometheus.Gauge
	SuccessfulBackups  prometheus.Counter
	FailedBackups      prometheus.Counter
}

Jump to

Keyboard shortcuts

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