registry

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func NewGtun

func NewGtun(cfg *GtunConfig, m *Models) *gtun

func NewGtund

func NewGtund(cfg *GtundConfig, m *Models) *gtund

Types

type Config

type Config struct {
	GtundConfig *GtundConfig `toml:"gtund"`
	GtunConfig  *GtunConfig  `toml:"gtun"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

func (*Config) String

func (c *Config) String() string

type GtunConfig

type GtunConfig struct {
	Listener string   `toml:"listen"`
	Tokens   []string `toml:"tokens"` // 用户授权码
}

type GtundConfig

type GtundConfig struct {
	Listener string `toml:"listen"`
	Token    string `toml:"token"` // 内部系统鉴权token
}

type Models

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

func NewModels

func NewModels() *Models

func (*Models) NewGtund

func (m *Models) NewGtund(addr string, reg *common.S2GRegister)

func (*Models) RandomGetGtund

func (m *Models) RandomGetGtund(win bool) (*common.S2GRegister, error)

func (*Models) RemoveGtund

func (m *Models) RemoveGtund(addr string)

func (*Models) Status

func (m *Models) Status() string

func (*Models) UpdateRefCount

func (m *Models) UpdateRefCount(addr string, count int)

Jump to

Keyboard shortcuts

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