server

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0, MIT Imports: 9 Imported by: 1

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
)

Jump to

Keyboard shortcuts

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