Documentation ¶
Index ¶
Constants ¶
View Source
const (
StrMaxSize = 1024
)
Service constants
Variables ¶
View Source
var ( ErrMaxSize = errors.New("maximum size of 1024 bytes exceeded") ErrStrValue = errors.New("maximum size of 1024 bytes exceeded") )
Service errors
Functions ¶
Types ¶
type GipkinService ¶
type GipkinService struct { }
ArithmeticService implement Service interface
func (GipkinService) DoTrace ¶
func (s GipkinService) DoTrace(KeyID string, SpanID string, TraceID string, BizCode string, ParentID string, Level string, ClassName string, MethodName string, LocationDesc string) (string, error)
/██████████████████████████████████████████████████████████████████ http://127.0.0.1:21212/op/DoTrace/gauge202112301916/RabbitMQ_To_Worker/12345678-415d-40e1-987a-17a24f83f47c/ATSINSPECT/AtsTaskService/Debug/HRLink.BackendService.AtsInspectService/AtsInspectExecute/持久化完成
func (GipkinService) HealthCheck ¶
func (s GipkinService) HealthCheck() bool
HealthCheck implement Service method 用于检查服务的健康状态,这里仅仅返回true。
type Service ¶
type Service interface { /// <param name="SiteCode"></param> /// <param name="SpanID">链路ID:如:SpanIDEnum.RabbitMQ_To_Worker</param> /// <param name="TraceID">批次ID或会话ID, 从头到尾要唯一</param> /// <param name="BizCode">业务代码 如: TaskSchedulerBizCodeEnum.ATSINSPECT</param> /// <param name="ParentID">上游服务</param> /// <param name="Level">级别</param> /// <param name="ClassName">类名 如:this.GetType().FullName</param> /// <param name="MethodName">方法名 如:MethodInfo.GetCurrentMethod().Name</param> /// <param name="LocationDesc">描述信息【可空】</param> DoTrace(KeyID string, SpanID string, TraceID string, BizCode string, ParentID string, Level string, ClassName string, MethodName string, LocationDesc string) (string, error) // Concat a and b Concat(a, b string) (string, error) // a,b pkg string value Diff(a, b string) (string, error) // HealthCheck check service health status HealthCheck() bool }
Service Define a service interface
type ServiceMiddleware ¶
ServiceMiddleware define service middleware
type Task_link_trace ¶
type Task_link_trace struct { //gorm.Model Key_id string `gorm:"size:36"` Span_id string `gorm:"size:50"` Trace_id string `gorm:"size:50"` Biz_code string `gorm:"size:50"` Parent_id string `gorm:"size:50"` Operate_dt time.Time `gorm:"type:datetime"` Operate_by string `gorm:"size:50"` Level string `gorm:"size:10"` Node_id string `gorm:"size:50"` Thread_id int `gorm:"int"` Class_name string `gorm:"size:100"` Method_name string `gorm:"size:100"` Location_desc string `gorm:"size:200"` }
func BuildEntity ¶
func (*Task_link_trace) TableName ¶
func (this *Task_link_trace) TableName() string
Click to show internal directories.
Click to hide internal directories.