Documentation
¶
Index ¶
- func AddInt(ctx context.Context, m string, n int, u units.Unit) int
- func Child(ctx context.Context, name string) (context.Context, func())
- func Close(ctx context.Context)
- func RenderTree(buf *bytes.Buffer, x *Collector, indent string) error
- func SetDenom(ctx context.Context, m string, n int, u units.Unit)
- func WithCollector(ctx context.Context, r *Collector) context.Context
- type Collector
- func (r *Collector) AddInt(m string, delta int, u units.Unit) int
- func (r *Collector) AddInt64(m string, delta int64, u units.Unit) (ret int64)
- func (r *Collector) Child(name string) *Collector
- func (r *Collector) Close()
- func (r *Collector) Duration() time.Duration
- func (r *Collector) GetChild(id uint) *Collector
- func (r *Collector) GetCounter(m string) *Counter
- func (r *Collector) IsClosed() bool
- func (r *Collector) List() []string
- func (r *Collector) ListChildren() []uint
- func (r *Collector) Name() string
- func (r *Collector) SetDenom(m string, x int64, u units.Unit)
- func (r *Collector) SetInt64(m string, x int64, u units.Unit)
- type Counter
- func (c *Counter) Absorb(c2 *Counter)
- func (c *Counter) Add(now time.Time, d int64, u units.Unit) int64
- func (c *Counter) Get() Value
- func (c *Counter) GetDelta() Value
- func (c *Counter) GetDenom() Value
- func (c *Counter) Set(now time.Time, x int64, u units.Unit)
- func (c *Counter) SetDenom(x int64, u units.Unit)
- func (c *Counter) String() string
- type Renderer
- type Summary
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTree ¶
RenderTree renders the state of the collector to buf.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
func FromContext ¶
func (*Collector) GetCounter ¶
func (*Collector) ListChildren ¶
Click to show internal directories.
Click to hide internal directories.