rest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delay

type Delay struct {
	IPAddr  *net.IP
	Source  string
	Method  string
	Slot    uint32
	DelayMS uint32
}

Delay holds information about a delay.

func (*Delay) MarshalJSON

func (d *Delay) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Delay) UnmarshalJSON

func (d *Delay) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithBlockDelaysSetter

func WithBlockDelaysSetter(setter probedb.BlockDelaysSetter) Parameter

WithBlockDelaysSetter sets the block delays setter for this module.

func WithHeadDelaysSetter

func WithHeadDelaysSetter(setter probedb.HeadDelaysSetter) Parameter

WithHeadDelaysSetter sets the head delays setter for this module.

func WithListenAddress

func WithListenAddress(listenAddress string) Parameter

WithListenAddress sets the listen address for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.Service) Parameter

WithMonitor sets the monitor for the module.

func WithServerName

func WithServerName(name string) Parameter

WithServerName sets the server name for this module.

type Service

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

Service is the REST daemon service.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new JSON-RPC daemon service.

Jump to

Keyboard shortcuts

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