cache

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: LGPL-2.1 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromLabelSVC = "service"
	PromLabelDC  = "dc"
)

Variables

This section is empty.

Functions

func DealMessage

func DealMessage(ctx context.Context,
	msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error)

func NewRouter

func NewRouter() *gin.Engine

Types

type HSParam

type HSParam struct {
	SvcName string
	DC      string
	Index   uint64
	Wait    time.Duration
	Stale   bool
	Tags    []string
}

type MsgWorker

type MsgWorker struct {
	ExitedFlag chan struct{} // 已经退出的标识
	ExitChan   chan struct{}
}

func NewMsgWorker

func NewMsgWorker() *MsgWorker

func (*MsgWorker) Start

func (w *MsgWorker) Start()

func (*MsgWorker) Stop

func (w *MsgWorker) Stop()

type WebAPIServer

type WebAPIServer struct {
	Server *http.Server
}

func NewWebServer

func NewWebServer(ginHandler *gin.Engine) *WebAPIServer

func (*WebAPIServer) Start

func (worker *WebAPIServer) Start()

func (*WebAPIServer) Stop

func (worker *WebAPIServer) Stop()

Jump to

Keyboard shortcuts

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