api

package
v2.1.4+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(
	logger lager.Logger,
	rootConfig *config.Config,
	monitClient MonitClient,
	sequenceNumberChecker SequenceNumberChecker,
	reqHealthChecker ReqHealthChecker,
	healthchecker HealthChecker,
	stateSnapshotter StateSnapshotter,
) (http.Handler, error)

Types

type HealthChecker

type HealthChecker interface {
	Check() (string, error)
}

type MonitClient

type MonitClient interface {
	StartServiceBootstrap(req *http.Request) (string, error)
	StartServiceJoin(req *http.Request) (string, error)
	StartServiceSingleNode(req *http.Request) (string, error)
	StopService(req *http.Request) (string, error)
	GetStatus(req *http.Request) (string, error)
	GetLogger(req *http.Request) lager.Logger
}

type ReqHealthChecker

type ReqHealthChecker interface {
	CheckReq(*http.Request) (string, error)
}

type RunFunc

type RunFunc func(req *http.Request) (string, error)

type SequenceNumberChecker

type SequenceNumberChecker interface {
	Check(req *http.Request) (string, error)
}

type StateSnapshotter

type StateSnapshotter interface {
	State() (domain.DBState, error)
}

type V1StatusResponse

type V1StatusResponse struct {
	WsrepLocalState        uint   `json:"wsrep_local_state"`
	WsrepLocalStateComment string `json:"wsrep_local_state_comment"`
	WsrepLocalIndex        uint   `json:"wsrep_local_index"`
	Healthy                bool   `json:"healthy"`
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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