Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HandlerAckDone is set when handler has been acknowledged of snapshotter termination. HandlerAckDone uint32 = 0 // HandlerAckWaiting is set when handler starts waiting of snapshotter termination. HandlerAckWaiting uint32 = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPHandler ¶
type HTTPHandler struct {
Initializer initializer.Initializer
Snapshotter *snapshotter.Snapshotter
Port int
Logger *logrus.Logger
AckState uint32
StopCh chan struct{}
EnableProfiling bool
ReqCh chan struct{}
AckCh chan struct{}
// contains filtered or unexported fields
}
HTTPHandler is implementation to handle HTTP API exposed by server
func (*HTTPHandler) GetStatus ¶ added in v0.7.0
func (h *HTTPHandler) GetStatus() int
GetStatus returns the current status in the HTTPHandler
func (*HTTPHandler) RegisterHandler ¶
func (h *HTTPHandler) RegisterHandler()
RegisterHandler registers the handler for different requests
func (*HTTPHandler) SetStatus ¶ added in v0.7.0
func (h *HTTPHandler) SetStatus(status int)
SetStatus sets the current status in the HTTPHandler
func (*HTTPHandler) Start ¶
func (h *HTTPHandler) Start()
Start starts the http server to listen for request
type HandlerAckState ¶
type HandlerAckState int32
HandlerAckState denotes the state the handler would be in after sending a stop request to the snapshotter.
type HandlerRequest ¶
type HandlerRequest int
HandlerRequest represents the type of request handler makes to the snapshotter.
const ( // HandlerSsrAbort is the HandlerRequest to the snapshotter to terminate the snapshot process. HandlerSsrAbort HandlerRequest = 0 )
Click to show internal directories.
Click to hide internal directories.