Documentation ¶
Index ¶
Constants ¶
View Source
const ( CMD_ERROR = iota // 错误响应 CMD_TICK // 心跳包 CMD_STOP CMD_RELOAD CMD_SHOW_MEMBERS )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControlOption ¶
type ControlOption func(tcp *TcpService)
func Reload ¶
func Reload(f ReloadFunc) ControlOption
func ShowMember ¶
func ShowMember(f ShowMemberFunc) ControlOption
func Stop ¶
func Stop(f StopFunc) ControlOption
type ReloadFunc ¶
type ReloadFunc func(service string)
type ShowMemberFunc ¶
type ShowMemberFunc func() string
type TcpClientNode ¶
type TcpClientNode struct {
// contains filtered or unexported fields
}
type TcpService ¶
type TcpService struct { Address string // contains filtered or unexported fields }
func NewControl ¶
func NewControl(ctx *app.Context, opts ...ControlOption) *TcpService
func (*TcpService) Close ¶
func (tcp *TcpService) Close()
func (*TcpService) Start ¶
func (tcp *TcpService) Start()
Click to show internal directories.
Click to hide internal directories.