From b39899e5d6e3b76a1c0429a54e01a650310970b3 Mon Sep 17 00:00:00 2001 From: HuangJiaLuo <1820799930@qq.com> Date: Mon, 11 Oct 2021 19:02:01 +0800 Subject: [PATCH] feat(middle-msg): update lru msg --- pkg/middle-msg/logx.go | 2 +- pkg/middle-msg/lru.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/middle-msg/logx.go b/pkg/middle-msg/logx.go index 90b2340..1dd9fe1 100644 --- a/pkg/middle-msg/logx.go +++ b/pkg/middle-msg/logx.go @@ -3,7 +3,7 @@ package middle_msg import "time" var ( - EventNameLog = "logcontext" + EventNameLog = "log-context" ) type LogContext struct { diff --git a/pkg/middle-msg/lru.go b/pkg/middle-msg/lru.go index b5aa092..b566510 100644 --- a/pkg/middle-msg/lru.go +++ b/pkg/middle-msg/lru.go @@ -1,3 +1,14 @@ package middle_msg +import "time" +var LruCleanContextName = "lru-clean-context" + +type LruCleanContext struct { + Keys []string + BeforeCleanSize int64 + BehindCleanSize int64 + + StartTime time.Duration + EndTime time.Duration +}