diff options
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go index 2916be1d..391e3298 100644 --- a/table/path.go +++ b/table/path.go @@ -41,6 +41,8 @@ type Path interface { setMedSetByTargetNeighbor(medSetByTargetNeighbor bool) getMedSetByTargetNeighbor() bool clone(IsWithdraw bool) Path + getTimestamp() time.Time + setTimestamp(t time.Time) MarshalJSON() ([]byte, error) } @@ -74,6 +76,14 @@ func NewPathDefault(rf bgp.RouteFamily, source *PeerInfo, nlri bgp.AddrPrefixInt return path } +func (pd *PathDefault) getTimestamp() time.Time { + return pd.timestamp +} + +func (pd *PathDefault) setTimestamp(t time.Time) { + pd.timestamp = t +} + func (pd *PathDefault) MarshalJSON() ([]byte, error) { return json.Marshal(struct { Network string |