uptime

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UptimeBucket = []byte("UptimeRecords")
)

Functions

func Run

func Run(ctx context.Context) error

Types

type Config

type Config struct {
	Self       registrar.Peer
	Peers      []registrar.Peer
	ListenPort string
	Dir        string

	Env      string
	NodeType string
}

type Uptime

type Uptime struct {
	Config Config
	DB     *bbolt.DB
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Uptime, error)

func (*Uptime) Start

func (u *Uptime) Start()

func (*Uptime) Stop

func (u *Uptime) Stop()

type UptimeResponse

type UptimeResponse struct {
	Host             string         `json:"host"`
	UptimePercentage float64        `json:"uptime_percentage"`
	Duration         string         `json:"duration"`
	UptimeHours      map[string]int `json:"uptime_raw_data"`
}

Jump to

Keyboard shortcuts

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