fcm

package module
v0.0.0-...-703b195 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

TODO(AD) Not thread safe.

func NewConnection

func NewConnection(upstream net.Conn, downstream net.Conn, proxy *Proxy) *Connection

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Drop

func (c *Connection) Drop()

type Node

type Node struct {
	ID        string
	Addr      string
	ProxyAddr string
	// contains filtered or unexported fields
}

func NewNode

func NewNode(logger *zap.Logger) (*Node, error)

func (*Node) Disable

func (n *Node) Disable() error

func (*Node) DropActive

func (n *Node) DropActive()

func (*Node) Enable

func (n *Node) Enable() error

func (*Node) Partition

func (n *Node) Partition(duration int, repeat int)

func (*Node) PartitionFor

func (n *Node) PartitionFor(duration int)

func (*Node) Shutdown

func (n *Node) Shutdown() error

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(listener net.Listener, targetAddr string) (*Proxy, error)

func (*Proxy) Close

func (p *Proxy) Close() error

func (*Proxy) DropActive

func (p *Proxy) DropActive()

DropActive drops all packets from existing connections but does not close them.

Jump to

Keyboard shortcuts

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