Skip to content
Snippets Groups Projects

Resolve "To improve the device watching mechanism a fetch all after time interval method should be implemented"

5 files
+ 80
8
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 11
0
@@ -7,6 +7,7 @@ type Event struct {
@@ -7,6 +7,7 @@ type Event struct {
ID uuid.UUID `json:"id,omitempty"`
ID uuid.UUID `json:"id,omitempty"`
EntityID uuid.UUID `json:"entity_id,omitempty"`
EntityID uuid.UUID `json:"entity_id,omitempty"`
Type string `json:"type,omitempty"`
Type string `json:"type,omitempty"`
 
Paths []string `json:"paths,omitempty"`
}
}
const (
const (
@@ -46,3 +47,13 @@ func NewUpdateEvent(entityID uuid.UUID) Event {
@@ -46,3 +47,13 @@ func NewUpdateEvent(entityID uuid.UUID) Event {
Type: TypeUpdate,
Type: TypeUpdate,
}
}
}
}
 
 
// NewMneUpdateEvent creates a new update event for managed network elements.
 
func NewMneUpdateEvent(entityID uuid.UUID, paths []string) Event {
 
return Event{
 
ID: uuid.New(),
 
EntityID: entityID,
 
Type: TypeUpdate,
 
Paths: paths,
 
}
 
}
Loading