forked from p15670423/monkey
Common: Use int instead of UUID in AbstractAgentEvent
This commit is contained in:
parent
bde44f74f5
commit
78d5094f90
|
@ -3,7 +3,7 @@ from abc import ABC
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from ipaddress import IPv4Address
|
from ipaddress import IPv4Address
|
||||||
from typing import FrozenSet, Union
|
from typing import FrozenSet, Union
|
||||||
from uuid import UUID, getnode
|
from uuid import getnode
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
|
@ -22,7 +22,7 @@ class AbstractAgentEvent(ABC):
|
||||||
:param tags: The set of tags associated with the event
|
:param tags: The set of tags associated with the event
|
||||||
"""
|
"""
|
||||||
|
|
||||||
source: UUID = field(default_factory=getnode)
|
source: int = field(default_factory=getnode)
|
||||||
target: Union[UUID, IPv4Address, None] = field(default=None)
|
target: Union[int, IPv4Address, None] = field(default=None)
|
||||||
timestamp: float = field(default_factory=time.time)
|
timestamp: float = field(default_factory=time.time)
|
||||||
tags: FrozenSet[str] = field(default_factory=frozenset)
|
tags: FrozenSet[str] = field(default_factory=frozenset)
|
||||||
|
|
Loading…
Reference in New Issue