Documentation ¶
Index ¶
- Variables
- func EventTypeName(value uint32) string
- func MatchEvent(event, flag uint32) bool
- func NewContainerEvent(target metadata.Container) rpcpb.EventNotify
- func NewContainerStatsEvent(stats *metapb.ContainerStats) rpcpb.EventNotify
- func NewInitEvent(snap Snapshot) (*rpcpb.InitEventData, error)
- func NewResourceEvent(target metadata.Resource, leaderID uint64, removed bool, create bool) rpcpb.EventNotify
- func NewResourceStatsEvent(stats *metapb.ResourceStats) rpcpb.EventNotify
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EventInit event init EventInit uint32 = 1 << 1 // EventResource resource event EventResource uint32 = 1 << 2 // EventContainer container create event EventContainer uint32 = 1 << 3 // EventResourceStats resource stats EventResourceStats uint32 = 1 << 4 // EventContainerStats container stats EventContainerStats uint32 = 1 << 5 // EventFlagAll all event EventFlagAll = 0xffffffff )
Functions ¶
func EventTypeName ¶ added in v0.2.0
EventTypeName returns event type name
func MatchEvent ¶
MatchEvent returns the flag has the target event
func NewContainerEvent ¶
func NewContainerEvent(target metadata.Container) rpcpb.EventNotify
NewContainerEvent create container event
func NewContainerStatsEvent ¶
func NewContainerStatsEvent(stats *metapb.ContainerStats) rpcpb.EventNotify
NewContainerStatsEvent create container stats event
func NewInitEvent ¶
func NewInitEvent(snap Snapshot) (*rpcpb.InitEventData, error)
NewInitEvent create init event
func NewResourceEvent ¶
func NewResourceEvent(target metadata.Resource, leaderID uint64, removed bool, create bool) rpcpb.EventNotify
NewResourceEvent create resource event
func NewResourceStatsEvent ¶
func NewResourceStatsEvent(stats *metapb.ResourceStats) rpcpb.EventNotify
NewResourceStatsEvent create resource stats event
Types ¶
Click to show internal directories.
Click to hide internal directories.