service

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromNamespace = "probe"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bonjour

type Bonjour struct {
	// contains filtered or unexported fields
}

Bonjour is the bonjour service

func NewBonjour

func NewBonjour(repo *repository.Probe) *Bonjour

NewBonjour creates a bonjour request-related service with repo

func (*Bonjour) Count

func (s *Bonjour) Count() (int64, error)

Count counts current bonjour requests from db

func (*Bonjour) Record

func (s *Bonjour) Record(b *model.Bonjour) error

Record adds a bonjour request in model.Bonjour to db

func (*Bonjour) UIDExists

func (s *Bonjour) UIDExists(uid string) bool

type Prometheus

type Prometheus struct {
	// contains filtered or unexported fields
}

func NewPrometheus

func NewPrometheus() *Prometheus

func (*Prometheus) IncPV

func (p *Prometheus) IncPV(platform, path string)

func (*Prometheus) IncUV

func (p *Prometheus) IncUV(platform, path string)

func (*Prometheus) RecordReconnection

func (p *Prometheus) RecordReconnection(platform string, reconnects int)

func (*Prometheus) RegisterLiveUserFunc

func (p *Prometheus) RegisterLiveUserFunc(function func() float64)

func (*Prometheus) RegisterUsersFunc

func (p *Prometheus) RegisterUsersFunc(function func() float64)

Jump to

Keyboard shortcuts

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