Documentation ¶ Index ¶ type Network func New(n int) *Network func (n *Network) GetValve(i, j int) bool func (n *Network) Partition(partitions ...[]int) func (n *Network) SetValve(i, j int, v bool) func (n *Network) Wrap(c net.Conn, i, j int) net.Conn Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Network ¶ type Network struct { // contains filtered or unexported fields } func New ¶ func New(n int) *Network func (*Network) GetValve ¶ func (n *Network) GetValve(i, j int) bool func (*Network) Partition ¶ func (n *Network) Partition(partitions ...[]int) Partition partitions the network according to the following rules: - nodes in the same slice are in the same partition - nodes not in any slice are not connected to any node - passing no slices represents a fully connected network func (*Network) SetValve ¶ func (n *Network) SetValve(i, j int, v bool) func (*Network) Wrap ¶ func (n *Network) Wrap(c net.Conn, i, j int) net.Conn Source Files ¶ View all Source files nettestutil.go Click to show internal directories. Click to hide internal directories.