rest

package
v1.3.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer interface {
	Run(context.Context) error
	RegisterServices(ctx context.Context, initDatabase bool) restfulspec.Config
}

APIServer interface for call api server

func New

func New(cfg Config) (a APIServer, err error)

New create restserver with config data

type Config

type Config struct {
	// api server bind address
	BindAddr string
	// monitor metric path
	MetricPath string

	// Datastore config
	Datastore datastore.Config

	// LeaderConfig for leader election
	LeaderConfig leaderConfig

	// AddonCacheTime is how long between two cache operations
	AddonCacheTime time.Duration

	// DisableStatisticCronJob close the calculate system info cronJob
	DisableStatisticCronJob bool
}

Config config for server

Directories

Path Synopsis
apis
v1

Jump to

Keyboard shortcuts

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