Documentation ¶
Index ¶
- func Catch(err error, hook func())
- func LocalIP() (ipv4 string, err error)
- func ParseKind(str string, kind reflect.Kind) interface{}
- type ClientContext
- type ClientHooks
- type FuncParser
- type GitLog
- type GitLogDailyFormatter
- type GitLogParser
- type GitRelease
- type GitReleaseAsset
- type LogParser
- type ServerContext
- type ServerHooks
- type SmartFuncParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientContext ¶
type ClientContext struct { Scanner config.Scanner Property config.Exchange // contains filtered or unexported fields }
func Client ¶
func Client(client config.Exchange, hooks ClientHooks) ClientContext
func (ClientContext) Shutdown ¶
func (ctx ClientContext) Shutdown()
func (ClientContext) Write ¶
func (ctx ClientContext) Write(buffer []byte)
type ClientHooks ¶
type ClientHooks struct { Started func() Connected func(server net.Conn, ctx ClientContext) Ready func(ctx ClientContext) Received func([]byte) }
type FuncParser ¶
type FuncParser interface { // msg string in format as @func(...args) Parse(msg string) config.Func }
FuncParser convert string to func
type GitLog ¶
type GitLog struct { Message string // contains filtered or unexported fields }
GitLog struct parsed
type GitLogDailyFormatter ¶
type GitLogDailyFormatter struct{}
func (GitLogDailyFormatter) Format ¶
func (GitLogDailyFormatter) Format(logs []GitLog) string
type GitLogParser ¶
type GitLogParser struct{}
type GitRelease ¶
type GitRelease struct { Name string `json:"name"` TagName string `json:"tag_name"` Assets []GitReleaseAsset `json:"assets"` }
type GitReleaseAsset ¶
type ServerContext ¶
type ServerContext struct { Scanner config.Scanner Connections map[string]net.Conn Property config.Exchange // contains filtered or unexported fields }
func Bootstrap ¶
func Bootstrap(server config.Exchange, hooks ServerHooks) ServerContext
func (ServerContext) Shutdown ¶
func (ctx ServerContext) Shutdown()
func (ServerContext) Write ¶
func (ctx ServerContext) Write(buffer []byte)
type ServerHooks ¶
type ServerHooks struct { Started func(ctx ServerContext) // client connection is successful Accepted func(client net.Conn, ctx ServerContext) Received func(buffer []byte, ctx ServerContext, conn net.Conn) Ready func(ctx ServerContext) Deleted func(client net.Conn, ctx ServerContext) }
type SmartFuncParser ¶
type SmartFuncParser struct{}
Click to show internal directories.
Click to hide internal directories.