Documentation ¶
Index ¶
- Variables
- type MODE
- type Shunt
- type Statistic
- func (c *Statistic) AddClient(f func(*statistic.RateResp) error) (id int64)
- func (c *Statistic) AddDownload(n uint64)
- func (c *Statistic) AddUpload(n uint64)
- func (c *Statistic) CloseConn(_ context.Context, x *statistic.CloseConnsReq) (*emptypb.Empty, error)
- func (c *Statistic) Conn(host string) (net.Conn, error)
- func (c *Statistic) Conns(context.Context, *emptypb.Empty) (*statistic.ConnResp, error)
- func (c *Statistic) PacketConn(host string) (net.PacketConn, error)
- func (c *Statistic) RemoveClient(id int64)
- func (c *Statistic) Statistic(_ *emptypb.Empty, srv statistic.Connections_StatisticServer) error
- func (c *Statistic) Update(s *protoconfig.Setting)
Constants ¶
This section is empty.
Variables ¶
View Source
var BYPASS_DATA []byte
View Source
var Mode = map[string]*MODE{ "direct": &DIRECT, "block": &BLOCK, }
Functions ¶
This section is empty.
Types ¶
type Shunt ¶
type Shunt struct {
// contains filtered or unexported fields
}
func (*Shunt) Update ¶
func (s *Shunt) Update(c *protoconfig.Setting)
type Statistic ¶
type Statistic struct { statistic.UnimplementedConnectionsServer // contains filtered or unexported fields }
func NewStatistic ¶
func (*Statistic) AddDownload ¶
func (c *Statistic) AddDownload(n uint64)
func (*Statistic) PacketConn ¶
func (c *Statistic) PacketConn(host string) (net.PacketConn, error)
func (*Statistic) RemoveClient ¶
func (c *Statistic) RemoveClient(id int64)
func (*Statistic) Update ¶
func (c *Statistic) Update(s *protoconfig.Setting)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.