apiserver

package
v0.20.9 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 23 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHealth

func GetHealth() metric.HealthMeta

GetHealth get health info

func SetUnhealthy

func SetUnhealthy(key string, message interface{})

SetUnhealthy set storage to unhealthy status

Types

type APIResource

type APIResource struct {
	Conf      *options.StorageOptions
	ActionsV1 []*httpserver.Action
	// contains filtered or unexported fields
}

APIResource api resource object

func GetAPIResource

func GetAPIResource() *APIResource

GetAPIResource that loads config from config-file and handlers from api-actions

func (*APIResource) GetDBClient

func (a *APIResource) GetDBClient(key string) drivers.DB

GetDBClient get db client by key

func (*APIResource) GetEventBus

func (a *APIResource) GetEventBus(key string) *watchbus.EventBus

GetEventBus get event bus by key

func (*APIResource) GetMsgQueue added in v0.20.3

func (a *APIResource) GetMsgQueue() *MessageQueue

GetMsgQueue get queue client

func (*APIResource) GetStoreClient

func (a *APIResource) GetStoreClient(key string) store.Store

GetStoreClient get store client by keys

func (*APIResource) InitActions

func (a *APIResource) InitActions()

InitActions init actions

func (*APIResource) ParseDBConfig

func (a *APIResource) ParseDBConfig() *conf.Config

ParseDBConfig parse db config

func (*APIResource) ParseQueueConfig added in v0.20.3

func (a *APIResource) ParseQueueConfig() *conf.Config

ParseQueueConfig parse queue config

func (*APIResource) SetConfig

func (a *APIResource) SetConfig(op *options.StorageOptions)

SetConfig Set storageConfig to APIResource

type BcsHealthIf

type BcsHealthIf struct {
	Code    int          `json:"code"`
	OK      bool         `json:"ok"`
	Data    healthStatus `json:"data"`
	Message string       `json:"message"`
}

BcsHealthIf interface

type MessageQueue added in v0.20.3

type MessageQueue struct {
	QueueFlag bool
	MsgQueue  msgqueue.MessageQueue
}

MessageQueue queue object

type SubStatus

type SubStatus struct {
	OK      bool   `json:"ok"`
	Message string `json:"message"`
}

SubStatus sub status

Jump to

Keyboard shortcuts

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