stats

package
v0.18.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package stats is the handler for the `vine debug stats` service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Stats is the Debug.Stats handler

func New

func New(done <-chan bool, windowSize int, services func() []*regpb.Service) (*Stats, error)

New initialises and returns a new Stats service handler

func (*Stats) Read

func (s *Stats) Read(ctx context.Context, req *stats.ReadRequest, rsp *stats.ReadResponse) error

Read returns gets a snapshot of all current stats

func (*Stats) Start

func (s *Stats) Start(done <-chan bool)

Start Starts scraping other services until the provided channel is closed

func (*Stats) Stream

Stream starts streaming stats

func (*Stats) Write

func (s *Stats) Write(ctx context.Context, req *stats.WriteRequest, rsp *stats.WriteResponse) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL