server

package
v0.0.0-...-514d410 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address string

func (Address) String

func (a Address) String() string

type HealthStatus

type HealthStatus struct {
	Available bool
	LastCheck time.Time
}

type Host

type Host string

func (Host) String

func (h Host) String() string

type Member

type Member struct {
	Host    Host
	Address Address
	Port    Port

	HealthStatus HealthStatus
	// contains filtered or unexported fields
}

func NewMember

func NewMember(
	host Host,
	address Address,
	port Port,
	healthStatus HealthStatus,
	metricsRepository metrics.MetricsRepository,
) *Member

func (*Member) AddMetrics

func (m *Member) AddMetrics(label metrics.MetricsLabel, val interface{}) error

func (*Member) GetMetrics

func (m *Member) GetMetrics(label metrics.MetricsLabel) (interface{}, error)

type Port

type Port int

func (Port) String

func (p Port) String() string

type Server

type Server struct {
	Host Host
	Port Port
}

Jump to

Keyboard shortcuts

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