api

package
v0.0.0-...-cf12e39 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIRoute

func APIRoute(router *gin.RouterGroup, eventChan chan *EventObj)

func CheckUpdate

func CheckUpdate(ctx *gin.Context)

func ClearDNSCache

func ClearDNSCache(ctx *gin.Context)

func ClearRecords

func ClearRecords(ctx *gin.Context)

func DNSCacheList

func DNSCacheList(ctx *gin.Context)

func DisableSystemProxy

func DisableSystemProxy(ctx *gin.Context)

func DownloadCert

func DownloadCert(ctx *gin.Context)

func DumpLarge

func DumpLarge(ctx *gin.Context)

func DumpRequest

func DumpRequest(ctx *gin.Context)

func EnableSystemProxy

func EnableSystemProxy(ctx *gin.Context)

func GenerateCert

func GenerateCert(ctx *gin.Context)

func GetAllowDump

func GetAllowDump(ctx *gin.Context)

func GetConnMode

func GetConnMode(ctx *gin.Context)

func GetRecords

func GetRecords(ctx *gin.Context)

func NewShutdown

func NewShutdown(eventChan chan *EventObj) func(ctx *gin.Context)

func NewUpgrade

func NewUpgrade(eventChan chan *EventObj) func(ctx *gin.Context)

func ReloadConfig

func ReloadConfig(eventChan chan *EventObj) func(ctx *gin.Context)

func SelectRefresh

func SelectRefresh(ctx *gin.Context)

func SelectServer

func SelectServer(ctx *gin.Context)

func ServerList

func ServerList(ctx *gin.Context)

func SetAllowDump

func SetAllowDump(ctx *gin.Context)

func SetConnMode

func SetConnMode(ctx *gin.Context)

func WsHandler

func WsHandler(w http.ResponseWriter, r *http.Request)

func WsSpeedHandler

func WsSpeedHandler(w http.ResponseWriter, r *http.Request)

Types

type ConnCenter

type ConnCenter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ConnCenter) Add

func (c *ConnCenter) Add(i int64, conn *websocket.Conn)

func (*ConnCenter) RangeSend

func (c *ConnCenter) RangeSend(v interface{})

func (*ConnCenter) Remove

func (c *ConnCenter) Remove(i int64)

type Group

type Group struct {
	Name       string    `json:"name"`
	Servers    []*Server `json:"servers"`
	SelectType string    `json:"select_type"`
}

type PushTimeBuffer

type PushTimeBuffer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*PushTimeBuffer) Push

func (p *PushTimeBuffer) Push(v interface{})

func (*PushTimeBuffer) Run

func (p *PushTimeBuffer) Run()

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type Server

type Server struct {
	Name     string `json:"name"`
	Selected bool   `json:"selected"`
	Rtt      string `json:"rtt,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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