probe

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

*

Per source, we can have the following state transitions

```mermaid # https://mermaid.live/ stateDiagram

direction LR
Idle --> Running
Running --> Failed
Running --> Idle
Failed --> Running
state Running {
	direction LR
	[*] --> Scheduled
	Scheduled --> New
	Scheduled --> Ignored
	New --> Probing
	Probing --> Found
	Probing --> Timeout
	Probing --> Blacklisted
	Timeout --> Reverify
	Reverify --> Scheduled
	Found --> [*]
	Blacklisted --> [*]
}

````

Index

Constants

View Source
const Reverify int = 0

Variables

This section is empty.

Functions

func NewBlacklistApi added in v0.0.2

func NewBlacklistApi(probe *Probe, info *ipinfo.Lookup) *dashboard

Types

type Card added in v0.0.2

type Card struct {
	Name  string
	Value int
}

type Probe

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

func NewProbe

func NewProbe(stats *stats.Stats, p *pool.Pool, c checker.Checker) *Probe

func (*Probe) Found

func (p *Probe) Found() int

func (*Probe) HttpDeletetByID

func (p *Probe) HttpDeletetByID(id string, r *http.Request) (interface{}, error)

func (*Probe) HttpGet

func (p *Probe) HttpGet(_ *http.Request) (interface{}, error)

func (*Probe) MarshalBinary

func (p *Probe) MarshalBinary() ([]byte, error)

func (*Probe) Schedule

func (p *Probe) Schedule(ctx context.Context, proxy pmux.Proxy, source int) bool

func (*Probe) Snapshot

func (p *Probe) Snapshot() internal

func (*Probe) Start

func (p *Probe) Start(ctx app.Context)

func (*Probe) Stats

func (p *Probe) Stats() Stats2

func (*Probe) UnmarshalBinary

func (p *Probe) UnmarshalBinary(data []byte) error

type Stats2

type Stats2 struct {
	Reverify             int
	Blacklist            int
	Seen                 int
	AverageVerifyAttempt int64
	ReverifyAttempts     []int
	Contribution         map[string]int
	Exclusive            map[string]int
	Dirty                map[string]int
}

type Summary added in v0.0.3

type Summary map[string]int

func (Summary) TopN added in v0.0.3

func (s Summary) TopN(n int) (cards []Card)

Jump to

Keyboard shortcuts

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