Documentation ¶
Index ¶
Constants ¶
const DisplayEvent = "DisplayEvent"
DisplayEvent is the sentinel to signal a display update
const EOF = "EOF"
EOF is the End Of File sentinel to signal no further Events are expected.
const PruneEvent = "PruneEvent"
PruneEvent is the sentinel to signal a prune operation
Variables ¶
var ConnKeys = connKeys{"name", "peer-node-id", "conn-name", "connection", "role", "congested"}
ConnKeys is a data container for the field keys of connection Events.
var DevKeys = devKeys{"name", "volume", "minor", "disk", "client", "size", "read", "written", "al-writes", "bm-writes", "upper-pending", "lower-pending", "al-suspended", "blocked", "quorum"}
DevKeys is a data container for the field keys of device Events.
var PeerDevKeys = peerDevKeys{"name", "peer-node-id", "conn-name", "volume", "replication", "peer-disk", "peer-client", "resync-suspended", "received", "sent", "out-of-sync", "pending", "unacked"}
PeerDevKeys is a data container for the field keys of device Events.
var ResKeys = resKeys{"name", "role", "suspended", "write-ordering", "unconfigured"}
ResKeys is a data container for the field keys of resource Events.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { sync.RWMutex Resource string PeerNodeID string ConnectionName string ConnectionStatus string // Long form explanation of ConnectionStatus. ConnectionHint string Role string Congested string // Calculated Values Danger uint64 // contains filtered or unexported fields }
Connection represents the connection from the local resource to a remote resource.
func (*Connection) Update ¶
func (c *Connection) Update(e Event)
Update the Connection with a new Event.
type DevVolume ¶
type DevVolume struct { Minor string DiskState string // Long from explanation of DiskState. DiskHint string Client string Quorum string Size uint64 ActivityLogSuspended string Blocked string QuorumAlert bool // Calculated Values ReadKiB *rate WrittenKiB *rate ActivityLogUpdates *rate BitMapUpdates *rate UpperPending *minMaxAvgCurrent LowerPending *minMaxAvgCurrent // contains filtered or unexported fields }
DevVolume represents a single volume of a local DRBD virtual block device.
func NewDevVolume ¶
NewDevVolume returns a DevVolume with internal structures initialized.
type Device ¶
type Device struct { sync.RWMutex Resource string Volumes map[string]*DevVolume //Calculated Values. Danger uint64 }
Device represents a local DRBD virtual block device.
type Event ¶
type Event struct { TimeStamp time.Time // EventType is the kind of update being relayed from DRBD: exists, change, call, etc. EventType string // Target is the kind of data contained within the Event: peer-device, connection, etc. Target string // Key/Value pairs separated by a ":" Fields map[string]string }
Event is a serialized update from the DRBD kernel module."
func NewDisplayEvent ¶
func NewDisplayEvent() Event
NewDisplayEvent returns a special Event signaling that the display should be updated
func NewEOF ¶
func NewEOF() Event
NewEOF returns a special Event signaling that no further input should be expected.
func NewPruneEvent ¶ added in v0.2.3
func NewPruneEvent() Event
NewPruneEvent returns a special Event signaling that the display should prune outdated data
func NewUnconfiguredRes ¶
NewUnconfiguredRes returns a special Event signaling that this resource is down(unconfigured).
type PeerDevVol ¶
type PeerDevVol struct { ReplicationStatus string // Long form explanation of Replication Status. ReplicationHint string DiskState string DiskHint string Client string ResyncSuspended string // Calulated Values OutOfSyncKiB *minMaxAvgCurrent PendingWrites *minMaxAvgCurrent UnackedWrites *minMaxAvgCurrent ReceivedKiB *rate SentKiB *rate // contains filtered or unexported fields }
PeerDevVol represents a single volume of a remote resources virtual block device.
func NewPeerDevVol ¶
func NewPeerDevVol(maxLen int) *PeerDevVol
NewPeerDevVol returns a PeerDevVol with internal structs initialized.
type PeerDevice ¶
type PeerDevice struct { sync.RWMutex Resource string PeerNodeID string ConnectionName string Volumes map[string]*PeerDevVol // Calulated values. Danger uint64 // contains filtered or unexported fields }
PeerDevice represents the virtual DRBD block device of a remote resource.
func NewPeerDevice ¶
func NewPeerDevice() *PeerDevice
NewPweerDevice returns a PeerDevice with internal maps initialized.
func (*PeerDevice) Update ¶
func (p *PeerDevice) Update(e Event)
Update the PeerDevice with a new Event.