mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-27 20:56:44 +00:00
Add peer operation
This commit is contained in:
@@ -9,9 +9,22 @@ const (
|
||||
ManagementEvent Type = "management"
|
||||
)
|
||||
|
||||
const (
|
||||
AddPeerByUserOperation Operation = iota
|
||||
AddPeerWithKeyOperation
|
||||
)
|
||||
|
||||
const (
|
||||
AddPeerByUserOperationMessage string = "Add new peer"
|
||||
AddPeerWithKeyOperationMessage string = AddPeerByUserOperationMessage
|
||||
)
|
||||
|
||||
// Type of the Event
|
||||
type Type string
|
||||
|
||||
// Operation is an action that triggered an Event
|
||||
type Operation int
|
||||
|
||||
// Store provides an interface to store or stream events.
|
||||
type Store interface {
|
||||
// Save an event in the store
|
||||
@@ -28,6 +41,8 @@ type Event struct {
|
||||
Timestamp time.Time
|
||||
// Operation that was performed during the event
|
||||
Operation string
|
||||
// OperationCode that was performed during the event
|
||||
OperationCode Operation
|
||||
// ID of the event (can be empty, meaning that it wasn't yet generated)
|
||||
ID uint64
|
||||
// Type of the event
|
||||
|
||||
Reference in New Issue
Block a user