idlewatcher

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKey = "idlewatcher.watcher"

Variables

This section is empty.

Functions

func Watchers

func Watchers() iter.Seq2[string, watcherDebug]

Types

type ForceCacheControl

type ForceCacheControl struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*ForceCacheControl) Unwrap

func (*ForceCacheControl) WriteHeader

func (f *ForceCacheControl) WriteHeader(code int)

type StopCallback

type StopCallback func() error

type Watcher

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

func NewWatcher

func NewWatcher(parent task.Parent, r routes.Route) (*Watcher, error)

TODO: fix stream type

func (*Watcher) Accept

func (w *Watcher) Accept() (conn gpnet.StreamConn, err error)

Accept implements types.Stream.

func (*Watcher) Addr

func (w *Watcher) Addr() net.Addr

Setup implements types.Stream.

func (*Watcher) Close

func (w *Watcher) Close() error

Close implements types.Stream.

func (*Watcher) Finish

func (w *Watcher) Finish(reason any)

Finish implements health.HealthMonitor.

func (*Watcher) Handle

func (w *Watcher) Handle(conn gpnet.StreamConn) error

Handle implements types.Stream.

func (*Watcher) Key

func (w *Watcher) Key() string

func (*Watcher) Latency

func (w *Watcher) Latency() time.Duration

Latency implements health.HealthMonitor.

func (*Watcher) MarshalJSON added in v0.11.1

func (w *Watcher) MarshalJSON() ([]byte, error)

MarshalJSON implements health.HealthMonitor.

func (*Watcher) Name

func (w *Watcher) Name() string

Name implements health.HealthMonitor.

func (*Watcher) ServeHTTP

func (w *Watcher) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

func (*Watcher) Setup

func (w *Watcher) Setup() error

Setup implements types.Stream.

func (*Watcher) Start

func (w *Watcher) Start(parent task.Parent) gperr.Error

Start implements health.HealthMonitor.

func (*Watcher) Status

func (w *Watcher) Status() health.Status

Status implements health.HealthMonitor.

func (*Watcher) String

func (w *Watcher) String() string

String implements health.HealthMonitor.

func (*Watcher) Task

func (w *Watcher) Task() *task.Task

Task implements health.HealthMonitor.

func (*Watcher) Uptime

func (w *Watcher) Uptime() time.Duration

Uptime implements health.HealthMonitor.

func (*Watcher) Wake

func (w *Watcher) Wake() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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