Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcreteEvent ¶
type ConcreteEvent struct {
Kind string `json:"kind"`
ID uint64 `json:"id"`
At time.Time `json:"at"`
Data any `json:"data"`
}
func (*ConcreteEvent) Highlight ¶
func (e *ConcreteEvent) Highlight() []string
Highlight informs the diff renderer of a list of event data keys that it should make more visible in the data flow.
func (*ConcreteEvent) Key ¶
func (e *ConcreteEvent) Key() string
Key relays Data.Key if implemented. The keyer interface is used by the diff output of `node events` command.
func (*ConcreteEvent) KeysToDelete ¶
func (e *ConcreteEvent) KeysToDelete() []string
KeysToDelete relays Data.KeysToDelete if implemented. The keysToDeleter interface is used by the diff output of `node events` command.
func (ConcreteEvent) Render ¶
func (e ConcreteEvent) Render() string
func (ConcreteEvent) String ¶
func (e ConcreteEvent) String() string
type ContextSetter ¶
type Event ¶
type Event struct {
// Kind can be either "patch" or "event".
// A patch is a change to the cluster dataset.
//
// Event subscribers can maintain a clone of the
// cluster dataset by:
// installing a full dataset with received full dataset
// or
// patching a full dataset with received patch events
Kind string `json:"kind"`
// ID is a unique event id
ID uint64 `json:"id"`
// At is the time the event was published
At time.Time `json:"at"`
// Data is the free-format dataset of the event
Data json.RawMessage `json:"data"`
}
Event describes a opensvc daemon event
func (Event) AsConcreteEvent ¶
func (e Event) AsConcreteEvent(data any) *ConcreteEvent
type ReadCloser ¶
Click to show internal directories.
Click to hide internal directories.