etherbond

package
v0.0.0-...-3be6dbe Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADV_CLU_FR = 0 + iota
	ADV_CH_FR
	ADV_IN_FR
	ADV_OUT_FR
	IO_TR_FR
	ACK_FR
)
View Source
const (
	ADV_CLU_CM = 0x01
	ADV_CH_CM  = 0x02
	ADV_IN_CM  = 0x03
	ADV_OUT_CM = 0x04
	IO_TR_CM   = 0x05
	ACK_CM     = 0xff
)
View Source
const (
	TRANSNEW = uint8(0) + iota
	TRANSDONE
)
View Source
const (
	GVPEER = uint8(0) + iota

	GVNODEININPEER
	GVNODEOUTINPEER
	GVNODECHINPEER

	GVCLUSININPEER
	GVCLUSOUTINPEER
	GVCLUSCHINPEER
)
View Source
const (
	ETHERTYPE = 0x8888
)

Variables

This section is empty.

Functions

func GV_config

func GV_config(element uint8) string

func InitializePeer

func InitializePeer(c *Config, p *raw.Conn, cl *Cluster, peer_id uint32, run *Cluster_runinfo, ops *Peer_op) error

func PartecipateCluster

func PartecipateCluster(c *Config, cl *Cluster, peer_id uint32, ifi *net.Interface) (*raw.Conn, *Cluster_runinfo, *Peer_op, chan bool, error)

Types

type ChOp

type ChOp interface {
}

type Cluster

type Cluster struct {
	ClusterId uint32
	Peers     []Peer
}

func UnmarshallCluster

func UnmarshallCluster(c *Config, cluster_file string) (*Cluster, error)

func (*Cluster) Dot

func (cl *Cluster) Dot() string

func (*Cluster) String

func (c *Cluster) String() string

type Cluster_runinfo

type Cluster_runinfo struct {
	ClusterId uint32
	Peers     map[uint32]Peer_runinfo
	Quorate   bool
	Degraded  bool
}

func (*Cluster_runinfo) String

func (c *Cluster_runinfo) String() string

type Config

type Config struct {
	Rsize uint8

	Debug bool
	Done  chan bool
	// contains filtered or unexported fields
}

type InOp

type InOp interface {
	ReadValue(*Config, *raw.Conn, *Cluster, uint32, *Cluster_runinfo, *Peer_op) interface{}
	SetId(id uint32)
	GetId() uint32
	// contains filtered or unexported methods
}

type Iuint8

type Iuint8 struct {
	Value uint8
	Id    uint32
}

func (*Iuint8) GetId

func (i *Iuint8) GetId() uint32

func (*Iuint8) ReadValue

func (i *Iuint8) ReadValue(c *Config, p *raw.Conn, cl *Cluster, peer_id uint32, run *Cluster_runinfo, ops *Peer_op) interface{}

func (*Iuint8) SetId

func (i *Iuint8) SetId(id uint32)

type Macs

type Macs struct {
	Assoc map[string]string
}

type Ouint8

type Ouint8 struct {
	Value uint8
	Id    uint32
}

func (*Ouint8) GetId

func (o *Ouint8) GetId() uint32

func (*Ouint8) SetId

func (o *Ouint8) SetId(id uint32)

func (*Ouint8) WriteValue

func (o *Ouint8) WriteValue(c *Config, p *raw.Conn, cl *Cluster, peer_id uint32, run *Cluster_runinfo, ops *Peer_op, val interface{})

type OutOp

type OutOp interface {
	WriteValue(*Config, *raw.Conn, *Cluster, uint32, *Cluster_runinfo, *Peer_op, interface{})
	SetId(id uint32)
	GetId() uint32
	// contains filtered or unexported methods
}

type Peer

type Peer struct {
	PeerId   uint32
	Channels []uint32
	Inputs   []uint32
	Outputs  []uint32
}

type Peer_op

type Peer_op struct {
	PeerId   uint32
	Channels []ChOp
	Inputs   []InOp
	Outputs  []OutOp
}

type Peer_runinfo

type Peer_runinfo struct {
	HAddr    []byte
	Channels map[uint32]bool
	Inputs   map[uint32]bool
	Outputs  map[uint32]bool
}

type Transaction

type Transaction struct {
	Ttype uint8
	Tag   uint32
	Data  string
}

Jump to

Keyboard shortcuts

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