Documentation ¶
Overview ¶
- Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
- Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
- Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
- Vestibulum commodo. Ut rhoncus gravida arcu. *
io 通信控制模块 管理所有的需要热重启的监听管理(端口监听), 只允许master执行新增, 序列化成描述信息+文件描述符列表,在fork worker时传递给worker, worker只允许使用传入进来的端口
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorInvalidListener = errors.New("invalid port-reqiure")
)
Functions ¶
This section is empty.
Types ¶
type EmptyTraffic ¶ added in v0.5.0
type EmptyTraffic struct { }
func (*EmptyTraffic) Close ¶ added in v0.5.0
func (e *EmptyTraffic) Close()
func (*EmptyTraffic) IsStop ¶ added in v0.5.0
func (e *EmptyTraffic) IsStop() bool
type ITraffic ¶
type ITraffic interface { Listen(addrs ...string) (tcp []net.Listener, ssl []net.Listener) IsStop() bool Close() }
func NewEmptyTraffic ¶ added in v0.5.0
func NewEmptyTraffic() ITraffic
func NewTraffic ¶
func NewTraffic(trafficData *TrafficData) ITraffic
type PbTraffic ¶
type PbTraffics ¶
type PbTraffics struct {
Traffic []*PbTraffic `json:"traffic,omitempty"`
}
type Traffic ¶
type Traffic struct {
*TrafficData
}
type TrafficData ¶ added in v0.8.1
type TrafficData struct {
// contains filtered or unexported fields
}
func NewTrafficData ¶ added in v0.8.1
func NewTrafficData(data map[string]*net.TCPListener) *TrafficData
func ReadTraffic ¶ added in v0.8.1
func ReadTraffic(r io.Reader, addrs ...string) (*TrafficData, error)
func (*TrafficData) All ¶ added in v0.8.1
func (t *TrafficData) All() map[string]*net.TCPListener
func (*TrafficData) Close ¶ added in v0.8.1
func (t *TrafficData) Close()
func (*TrafficData) IsStop ¶ added in v0.8.1
func (t *TrafficData) IsStop() bool
func (*TrafficData) Shutdown ¶ added in v0.8.1
func (t *TrafficData) Shutdown()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.