http

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler http请求封装器

func (*Handler) ParseProto

func (h *Handler) ParseProto(obj proto.Message) error

ParseProto 解析请求proto

func (*Handler) ResponseProto

func (h *Handler) ResponseProto(code api.Code, obj proto.Message)

ResponseProto 回复proto

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server http server

func (*Server) GetCounterStat

func (h *Server) GetCounterStat(req *restful.Request, rsp *restful.Response)

GetCounterStat 获取counter本地和远端的信息

func (*Server) GetCountersTotal

func (h *Server) GetCountersTotal(req *restful.Request, rsp *restful.Response)

GetCountersTotal 获取本地缓存的counter个数

func (*Server) GetPort

func (h *Server) GetPort() uint32

GetPort get port

func (*Server) GetProtocol

func (h *Server) GetProtocol() string

GetProtocol get protocol

func (*Server) Index

func (h *Server) Index(req *restful.Request, rsp *restful.Response)

Index 默认的handler

func (*Server) Initialize

func (h *Server) Initialize(option map[string]interface{}) error

Initialize subInitialize

func (*Server) ListCountersKeys

func (h *Server) ListCountersKeys(req *restful.Request, rsp *restful.Response)

ListCountersKeys 获取本地缓存的counter的key列表 展示所有缓存数据的信息 只返回本地信息,不返回远端信息(避免数据太多,占住太多请求远端的资源)

func (*Server) Run

func (h *Server) Run(errCh chan error)

Run running

func (*Server) Stop

func (h *Server) Stop()

Stop server

Jump to

Keyboard shortcuts

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