Documentation
¶
Overview ¶
Package common defines reusable objects for APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelNames ¶ added in v0.4.0
func LabelNames() []string
LabelNames returns the label names of Position.
func SetPosition ¶
SetPosition sets a position returned from fn to attach it to ctx, then return a new context.
func ShardLabelNames ¶ added in v0.4.0
func ShardLabelNames() []string
ShardLabelNames returns the label names of Position. It is used for shard level metrics.
Types ¶
type Error ¶ added in v0.2.0
type Error struct {
// contains filtered or unexported fields
}
Error wraps a error msg.
type KindVersion ¶
KindVersion contains elements which identify the API uniquely.
func (*KindVersion) String ¶
func (s *KindVersion) String() string
type Position ¶
Position is stored in the context. The logger could attach it for debugging.
func GetPosition ¶ added in v0.4.0
GetPosition returns the position from ctx.
func (Position) LabelValues ¶ added in v0.4.0
LabelValues returns the label values of Position.
func (Position) ShardLabelValues ¶ added in v0.4.0
ShardLabelValues returns the label values of Position. It is used for shard level metrics.
Click to show internal directories.
Click to hide internal directories.