common

package
v0.0.0-...-d5a3342 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSDServer

type FSDServer struct {
	IpAddress           string  `json:"ip_address" yaml:"ip_address"`
	Name                string  `json:"name" yaml:"name"`
	Country             string  `json:"country" yaml:"country"`
	Latitude            float64 `json:"latitude" yaml:"latitude"`
	Longitude           float64 `json:"longitude" yaml:"longitude"`
	CurrentUsers        int     `json:"current_users" yaml:"current_users"`
	MaxUsers            int     `json:"max_users" yaml:"max_users"`
	RemainingSlots      int     `json:"remaining_slots" yaml:"remaining_slots"`
	Distance            float64 `json:"distance" yaml:"distance"`
	AbleToUpdate        bool    `json:"able_to_update" yaml:"able_to_update"`
	UpdateFailureCount  int     `json:"update_failure_count" yaml:"update_failure_count"`
	PrometheusCollector prometheus.Collector
}

func NewFSDServer

func NewFSDServer(droplet *godo.Droplet) *FSDServer

func NewMockFSDServer

func NewMockFSDServer(mockFsdServer *FSDServer) *FSDServer

func (*FSDServer) AcceptingConnections

func (fsd *FSDServer) AcceptingConnections() int

func (*FSDServer) Polling

func (fsd *FSDServer) Polling(enableFsdServerProm chan<- string, deregisterFsd chan<- string)

type FSDServerLocation

type FSDServerLocation struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"Longitude"`
}

type MockDnsQuery

type MockDnsQuery struct {
	SourceIpAddress    string `yaml:"source_ip_address"`
	ExpectedIpReturned string `yaml:"expected_ip_returned"`
}

type TestingDataYaml

type TestingDataYaml struct {
	MockFsdServers []FSDServer    `yaml:"mockFsdServers"`
	MockDnsQueries []MockDnsQuery `yaml:"mockDnsQueries"`
}

Jump to

Keyboard shortcuts

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