srv

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVICE_LRUCACHE = "lrucache"
	SERVICE_REDIS    = "redis"
	SERVICE_OSS      = "oss"
	SERVICE_MONGODB  = "mongodb"
	SERVICE_APP      = "uv-app"
)
View Source
const (
	ERRNO_OK              = 200
	ERRNO_NOT_FOUND       = 404
	ERRNO_INTERNAL_SERVER = 500
	ERRNO_INPUT_DATA      = 400
)
View Source
const (
	DB_VER = 1
)

Variables

This section is empty.

Functions

func Reg

func Reg(s *G.Server)

Types

type AppService

type AppService struct {
	Prefix     string   `json:"prefix"`
	BasePath   string   `json:"basePath"`
	Aid        int64    `json:"aid"`          //区域ID
	Nid        int64    `json:"nid"`          //节点ID
	Expires    int64    `json:"expires"`      //过期秒数
	Db         string   `json:"db"`           // mongodb db
	AppMaxSize int64    `json:"app-max-size"` // 应用包最大字节数
	IID        *iid.IID `json:"-"`
	// contains filtered or unexported fields
}

func GetAppService

func GetAppService(ctx micro.Context, name string) (*AppService, error)

func (*AppService) Config

func (s *AppService) Config() interface{}

* * 服务配置 *

func (*AppService) Name

func (s *AppService) Name() string

* * 服务名称 *

func (*AppService) NewID

func (s *AppService) NewID() string

func (*AppService) NewSecret

func (s *AppService) NewSecret() string

func (*AppService) OnInit

func (s *AppService) OnInit(ctx micro.Context) error

* * 初始化服务 *

func (*AppService) OnValid

func (s *AppService) OnValid(ctx micro.Context) error

* * 校验服务是否可用 *

func (*AppService) Recycle

func (s *AppService) Recycle()

Jump to

Keyboard shortcuts

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