Back to

Package server

Latest Go to latest

The highest tagged major version is .

Published: Aug 11, 2020 | License: MIT | Module:


func IsPathExist

func IsPathExist(path string) bool

func RC

func RC() *redis.ClusterClient

type Config

type Config struct {
	Listen string
	Logger Logger
	Redis  Redis

func (*Config) LoadConfig

func (c *Config) LoadConfig(path string) error

load config.toml

type Logger

type Logger struct {
	LogPath    string
	MaxSize    int
	MaxBackups int
	MaxAge     int
	Level      string

type Meta

type Meta struct {
	Code  int    `json:"code"`
	Error string `json:"error"`

type Redis

type Redis struct {
	DB       int
	Password string
	PoolSize int
	Cluster  []string

type Resp

type Resp struct {
	Meta Meta        `json:"meta"`
	Data interface{} `json:"data"`

type Server

type Server struct {
	Config *Config
	// contains filtered or unexported fields

func (*Server) Start

func (s *Server) Start() error

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier