Documentation ¶
Index ¶
- Variables
- type BootingInfo
- type Dialer
- type FederationPartnerNodeHeader
- type GlobalLease
- type NodeID
- type NodeIdRange
- type NodeInstance
- type NodePhase
- type PToPActor
- type PToPHeader
- type PartnerNodeInfo
- type RoutingHeader
- type RoutingToken
- type SeedNodeInfo
- type SiteNode
- func (s *SiteNode) Bootstrap(ctx context.Context) error
- func (s *SiteNode) Close() error
- func (s *SiteNode) Discover(ctx context.Context) ([]PartnerNodeInfo, error)
- func (s *SiteNode) Join(ctx context.Context) error
- func (s *SiteNode) KnownPartnerNodes(filter func(PartnerNodeInfo) bool) []PartnerNodeInfo
- func (s *SiteNode) Route(ctx context.Context, id NodeID, msg *transport.Message) (*transport.ByteArrayMessage, error)
- func (s *SiteNode) SendOneWay(id NodeID, msg *transport.Message) error
- func (s *SiteNode) Serve() error
- type SiteNodeConfig
- type TicketGap
- type TimeRange
- type VoteTicket
Constants ¶
This section is empty.
Variables ¶
View Source
var MinNodeID = NodeID{0, 0}
MinNodeID is the start of NodeID of a federacy ring
Functions ¶
This section is empty.
Types ¶
type BootingInfo ¶
type BootingInfo struct { Leader NodeID Time common.StopwatchTime }
type FederationPartnerNodeHeader ¶
type FederationPartnerNodeHeader struct { PartnerNodeInfo Flags int32 }
type GlobalLease ¶
type GlobalLease struct { Tickets []VoteTicket Delta common.TimeSpan BaseTime common.StopwatchTime }
type NodeID ¶
type NodeID uint128
NodeID is an unique identifier for each node in a federacy ring a NodeID is a 128 bit number, unit128_t
func NodeIDFromHex ¶
NodeIDFromHex convert string in 16 base from to NodeID
func NodeIDFromMD5 ¶
NodeIDFromMD5 hash any string into a NodeID using MD5
func NodeIDFromV4Generator ¶
func (*NodeID) Unmarshal ¶
func (n *NodeID) Unmarshal(meta serialization.FabricSerializationType, s serialization.Decoder) error
type NodeIdRange ¶
func (*NodeIdRange) Contains ¶
func (r *NodeIdRange) Contains(id NodeID) bool
func (*NodeIdRange) Marshal ¶
func (r *NodeIdRange) Marshal(s serialization.Encoder) error
func (*NodeIdRange) Unmarshal ¶
func (r *NodeIdRange) Unmarshal(meta serialization.FabricSerializationType, s serialization.Decoder) error
type NodeInstance ¶
type PToPHeader ¶
type PToPHeader struct { From NodeInstance To NodeInstance Actor PToPActor FromRing string ToRing string ExactInstance bool }
type PartnerNodeInfo ¶
type PartnerNodeInfo struct { Instance NodeInstance // The node instance of the node which this information is of. Phase NodePhase // The phase of the node. Address string // The address of the node. Token RoutingToken // The token owned by this node. LeaseAgentAddress string // The address of the lease agent for this node. LeaseAgentInstanceId int64 // Instance of the lease agent. EndToEnd bool NodeFaultDomainId common.Uri // The fault domain setting of this node. RingName string }
type RoutingHeader ¶
type RoutingToken ¶
type RoutingToken struct { Range NodeIdRange Version uint64 }
type SeedNodeInfo ¶
type SiteNode ¶
type SiteNode struct {
// contains filtered or unexported fields
}
func NewSiteNode ¶
func NewSiteNode(config SiteNodeConfig) (*SiteNode, error)
func (*SiteNode) Discover ¶
func (s *SiteNode) Discover(ctx context.Context) ([]PartnerNodeInfo, error)
func (*SiteNode) KnownPartnerNodes ¶
func (s *SiteNode) KnownPartnerNodes(filter func(PartnerNodeInfo) bool) []PartnerNodeInfo
func (*SiteNode) SendOneWay ¶
type SiteNodeConfig ¶
type SiteNodeConfig struct { ClientTLS *tls.Config ClientDialer Dialer TransportServer *transport.Server LeaseAgent *lease.Agent Instance NodeInstance SeedNodes []SeedNodeInfo }
type TicketGap ¶
type TicketGap struct { Range NodeIdRange Interval TimeRange }
type TimeRange ¶
type TimeRange struct { Begin common.StopwatchTime End common.StopwatchTime }
type VoteTicket ¶
type VoteTicket struct { VoteId NodeID ExpireTime common.StopwatchTime Gaps []TicketGap }
Click to show internal directories.
Click to hide internal directories.