Documentation ¶
Overview ¶
Package fcradminserver - provides an interface to do admin networking.
Package fcradminserver - provides an interface to do admin networking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(w http.ResponseWriter, header int, msg string)
Types ¶
type FCRAdminServer ¶
type FCRAdminServer interface { // Start starts the server. Start() error // Shutdown stops the server. Shutdown() // AddHandler adds a handler to the server, which handles a given message type (POST). AddHandler(msgType byte, handler func(data []byte) (byte, []byte, error)) FCRAdminServer }
FCRAdminServer represents a server handling admin requests.
func NewFCRAdminServerImplV1 ¶
func NewFCRAdminServerImplV1(listenAddr string, keyStr string) FCRAdminServer
type FCRAdminServerImplV1 ¶
type FCRAdminServerImplV1 struct {
// contains filtered or unexported fields
}
FCRAdminServerImplV1 implements the FCRAdminServer
func (*FCRAdminServerImplV1) AddHandler ¶
func (s *FCRAdminServerImplV1) AddHandler(msgType byte, handler func(data []byte) (byte, []byte, error)) FCRAdminServer
func (*FCRAdminServerImplV1) ServeHTTP ¶
func (s *FCRAdminServerImplV1) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*FCRAdminServerImplV1) Shutdown ¶
func (s *FCRAdminServerImplV1) Shutdown()
func (*FCRAdminServerImplV1) Start ¶
func (s *FCRAdminServerImplV1) Start() error
Click to show internal directories.
Click to hide internal directories.