server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCode1
	ErrorCode2
	ErrorCode3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResult

type CommonResult struct {
	IsSuc     bool
	ErrorCode int
	Msg       string
	Data      interface{}
}

CommonResult http接口通用返回结果

func Fail

func Fail(errCode int, msg string) *CommonResult

func FailWithMsg

func FailWithMsg(msg string) *CommonResult

func Suc

func Suc() *CommonResult

func SucWithData

func SucWithData(data interface{}, msg ...string) *CommonResult

func SucWithMsg

func SucWithMsg(msg string) *CommonResult

type RedisAgentServer

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

func NewRedisAgentServer

func NewRedisAgentServer(addr string, cleaner *cleaner.SystemDataCleaner) *RedisAgentServer

func (*RedisAgentServer) ListenAndServe

func (agentServer *RedisAgentServer) ListenAndServe() (<-chan error, error)

func (*RedisAgentServer) Shutdown

func (agentServer *RedisAgentServer) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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