server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPathExist

func IsPathExist(path string) bool

func RC

func RC() *redis.ClusterClient

Types

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

Jump to

Keyboard shortcuts

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