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 {
EtcdInitializer initializer.EtcdInitializer
Port int
Logger *logrus.Logger
AckState uint32
Status int
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) RegisterHandler ¶
func (h *HTTPHandler) RegisterHandler()
RegisterHandler registers the handler for different requests
func (*HTTPHandler) Start ¶
func (h *HTTPHandler) Start()
Start start the http server to listen for request
func (*HTTPHandler) Stop ¶
func (h *HTTPHandler) Stop() error
Stop start 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.