Documentation
¶
Index ¶
- type Announcement
- type Container
- func GetAnnouncementContainer(sentTimestamp time.Time, sentBy string, networkID int64, ...) *Container
- func GetFrameAckContainer(networkID int64, sourceEndpointID ksuid.KSUID, sourceEndpointName string, ...) *Container
- func GetFrameContainer(resendPeriod time.Duration, resendExpiry time.Duration, networkID int64, ...) *Container
- type Frame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Announcement ¶
type Announcement struct { // used to determine when to expire an announcement SentRate time.Duration `json:"sent_rate"` // UDP port the announced endpoint is listening on for unicast data communications ListenPort int `json:"listen_port"` ListenAddr *net.UDPAddr // UDP address the announced endpoint is sending discovery announcements DiscoveryListenAddress string `json:"discovery_listen_address"` DiscoveryListenAddr *net.UDPAddr // UDP address the announced endpoint is listening on for discovery announcements DiscoveryTargetAddress string `json:"discovery_target_address"` DiscoveryTargetAddr *net.UDPAddr // used to avoid announcement forwarding loops Forwarded bool }
func (*Announcement) Copy ¶
func (a *Announcement) Copy() *Announcement
func (*Announcement) String ¶
func (a *Announcement) String() string
type Container ¶
type Container struct { // timestamp the sender originally sent the container SentTimestamp time.Time `json:"sent_timestamp"` // when then sender most recently sent the container (according to the sender) LastSentTimestamp time.Time `json:"last_sent_timestamp"` // source address according to the sender SentBy string `json:"sent_by"` SentByAddr *net.UDPAddr // destination address according to the sender SentTo string `json:"sent_to"` SentToAddr *net.UDPAddr // timestamp the receiver received the container ReceivedTimestamp time.Time `json:"-"` // destination address according to the receiver ReceivedFrom string `json:"-"` ReceivedFromAddr *net.UDPAddr // source address according to the receiver ReceivedBy string `json:"-"` ReceivedByAddr *net.UDPAddr // used to identify a group of endpoints NetworkID int64 `json:"network_id"` // automatically generated per endpoint lifecycle SourceEndpointID ksuid.KSUID `json:"source_endpoint_id"` // set by user- cannot appear twice in the same network SourceEndpointName string `json:"source_endpoint_name"` // content for an announcement Announcement *Announcement `json:"announcement"` // content for a frame Frame *Frame `json:"frame"` }
func GetFrameAckContainer ¶
func GetFrameContainer ¶
func GetFrameContainer( resendPeriod time.Duration, resendExpiry time.Duration, networkID int64, sourceEndpointID ksuid.KSUID, sourceEndpointName string, correlationID ksuid.KSUID, fragmentCount int64, fragmentIndex int64, destinationEndpointID ksuid.KSUID, destinationEndpointName string, needsAck bool, isAck bool, payload []byte, ) *Container
type Frame ¶
type Frame struct { // don't attempt to resend until the frame is this much older ResendPeriod time.Duration `json:"-"` // don't attempt to resend the frame after it's this much older ResendExpiry time.Duration `json:"-"` // unique for this frame FrameID ksuid.KSUID `json:"frame_id"` // unique for a related group of frames CorrelationID ksuid.KSUID `json:"correlation_id"` // how many fragments there are (1 = single frame) FragmentCount int64 `json:"fragment_count"` // which one this is FragmentIndex int64 `json:"fragment_index"` // a distant SourceEndpointID DestinationEndpointID ksuid.KSUID `json:"destination_endpoint_id"` // a distance SourceEndpointName DestinationEndpointName string `json:"destination_endpoint_name"` // is a markAck needed? NeedsAck bool `json:"needs_ack"` // is this a markAck? IsAck bool `json:"is_ack"` // the actual user payload (or fragment thereof) Payload []byte `json:"payload"` }
Click to show internal directories.
Click to hide internal directories.