Documentation ¶
Overview ¶
Package peers is a generated protocol buffer package.
It is generated from these files:
types.proto
It has these top-level messages:
Peer ComputeUsage MemoryUsage PeerList
Index ¶
- Constants
- Variables
- func IsOutdated(s *Peer, remote *Peer) (outdated bool)
- type ComputeUsage
- type MemoryUsage
- func (*MemoryUsage) Descriptor() ([]byte, []int)
- func (m *MemoryUsage) GetAlloc() uint64
- func (m *MemoryUsage) GetNumGC() uint32
- func (m *MemoryUsage) GetSys() uint64
- func (m *MemoryUsage) GetTotalAlloc() uint64
- func (*MemoryUsage) ProtoMessage()
- func (m *MemoryUsage) Reset()
- func (m *MemoryUsage) String() string
- type Peer
- func (*Peer) Descriptor() ([]byte, []int)
- func (m *Peer) GetAddress() string
- func (m *Peer) GetComputeUsage() *ComputeUsage
- func (m *Peer) GetHostname() string
- func (m *Peer) GetID() string
- func (m *Peer) GetLastAdded() int64
- func (m *Peer) GetLastDeleted() int64
- func (m *Peer) GetMemoryUsage() *MemoryUsage
- func (m *Peer) GetMeshID() string
- func (m *Peer) GetRuntime() string
- func (m *Peer) GetServices() []string
- func (m *Peer) GetStarted() int64
- func (s *Peer) IsAdded() bool
- func (s *Peer) IsRemoved() bool
- func (*Peer) ProtoMessage()
- func (m *Peer) Reset()
- func (m *Peer) String() string
- type PeerList
- func (e *PeerList) Append(entry state.Entry)
- func (set PeerList) Apply(f func(s *Peer))
- func (set PeerList) ApplyE(f func(s *Peer) error) error
- func (set PeerList) ApplyIdx(f func(idx int, s *Peer))
- func (e *PeerList) AtIndex(idx int) state.Entry
- func (*PeerList) Descriptor() ([]byte, []int)
- func (set PeerList) Filter(filters ...peerFilter) PeerList
- func (m *PeerList) GetPeers() []*Peer
- func (e *PeerList) Length() int
- func (e *PeerList) New() state.EntrySet
- func (*PeerList) ProtoMessage()
- func (e *PeerList) Range(f func(idx int, entry state.Entry))
- func (m *PeerList) Reset()
- func (e *PeerList) Set(idx int, entry state.Entry)
- func (m *PeerList) String() string
- type PeerStore
Constants ¶
View Source
const ( PeerCreated string = "peer_created" PeerUpdated string = "peer_updated" PeerDeleted string = "peer_deleted" )
Variables ¶
View Source
var (
ErrPeerNotFound = errors.New("peer not found")
)
Functions ¶
func IsOutdated ¶
Types ¶
type ComputeUsage ¶ added in v0.0.20
type ComputeUsage struct { Cores int64 `protobuf:"varint,1,opt,name=Cores" json:"Cores,omitempty"` Goroutines int64 `protobuf:"varint,2,opt,name=Goroutines" json:"Goroutines,omitempty"` }
func (*ComputeUsage) Descriptor ¶ added in v0.0.20
func (*ComputeUsage) Descriptor() ([]byte, []int)
func (*ComputeUsage) GetCores ¶ added in v0.0.20
func (m *ComputeUsage) GetCores() int64
func (*ComputeUsage) GetGoroutines ¶ added in v0.0.20
func (m *ComputeUsage) GetGoroutines() int64
func (*ComputeUsage) ProtoMessage ¶ added in v0.0.20
func (*ComputeUsage) ProtoMessage()
func (*ComputeUsage) Reset ¶ added in v0.0.20
func (m *ComputeUsage) Reset()
func (*ComputeUsage) String ¶ added in v0.0.20
func (m *ComputeUsage) String() string
type MemoryUsage ¶ added in v0.0.20
type MemoryUsage struct { Alloc uint64 `protobuf:"varint,1,opt,name=Alloc" json:"Alloc,omitempty"` TotalAlloc uint64 `protobuf:"varint,2,opt,name=TotalAlloc" json:"TotalAlloc,omitempty"` Sys uint64 `protobuf:"varint,3,opt,name=Sys" json:"Sys,omitempty"` NumGC uint32 `protobuf:"varint,4,opt,name=NumGC" json:"NumGC,omitempty"` }
func (*MemoryUsage) Descriptor ¶ added in v0.0.20
func (*MemoryUsage) Descriptor() ([]byte, []int)
func (*MemoryUsage) GetAlloc ¶ added in v0.0.20
func (m *MemoryUsage) GetAlloc() uint64
func (*MemoryUsage) GetNumGC ¶ added in v0.0.20
func (m *MemoryUsage) GetNumGC() uint32
func (*MemoryUsage) GetSys ¶ added in v0.0.20
func (m *MemoryUsage) GetSys() uint64
func (*MemoryUsage) GetTotalAlloc ¶ added in v0.0.20
func (m *MemoryUsage) GetTotalAlloc() uint64
func (*MemoryUsage) ProtoMessage ¶ added in v0.0.20
func (*MemoryUsage) ProtoMessage()
func (*MemoryUsage) Reset ¶ added in v0.0.20
func (m *MemoryUsage) Reset()
func (*MemoryUsage) String ¶ added in v0.0.20
func (m *MemoryUsage) String() string
type Peer ¶
type Peer struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` MeshID string `protobuf:"bytes,2,opt,name=MeshID" json:"MeshID,omitempty"` Hostname string `protobuf:"bytes,3,opt,name=Hostname" json:"Hostname,omitempty"` Address string `protobuf:"bytes,4,opt,name=Address" json:"Address,omitempty"` LastAdded int64 `protobuf:"varint,5,opt,name=LastAdded" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,6,opt,name=LastDeleted" json:"LastDeleted,omitempty"` MemoryUsage *MemoryUsage `protobuf:"bytes,7,opt,name=MemoryUsage" json:"MemoryUsage,omitempty"` ComputeUsage *ComputeUsage `protobuf:"bytes,8,opt,name=ComputeUsage" json:"ComputeUsage,omitempty"` Runtime string `protobuf:"bytes,9,opt,name=Runtime" json:"Runtime,omitempty"` Services []string `protobuf:"bytes,10,rep,name=Services" json:"Services,omitempty"` Started int64 `protobuf:"varint,11,opt,name=Started" json:"Started,omitempty"` }
func (*Peer) Descriptor ¶
func (*Peer) GetAddress ¶
func (*Peer) GetComputeUsage ¶ added in v0.0.20
func (m *Peer) GetComputeUsage() *ComputeUsage
func (*Peer) GetHostname ¶
func (*Peer) GetLastAdded ¶
func (*Peer) GetLastDeleted ¶
func (*Peer) GetMemoryUsage ¶ added in v0.0.20
func (m *Peer) GetMemoryUsage() *MemoryUsage
func (*Peer) GetRuntime ¶ added in v0.0.20
func (*Peer) GetServices ¶ added in v0.0.22
func (*Peer) GetStarted ¶ added in v0.0.23
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
type PeerList ¶
type PeerList struct {
Peers []*Peer `protobuf:"bytes,1,rep,name=Peers" json:"Peers,omitempty"`
}
func (*PeerList) Descriptor ¶
func (*PeerList) ProtoMessage ¶
func (*PeerList) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.