Versions in this module Expand all Collapse all v1 v1.2.0-pre Jun 6, 2024 v1.1.5 Aug 23, 2024 Changes in this version + type Client interface + Geo func() Geo + Usage func() Usage + type Cpu struct + Count int + Guest uint64 + GuestNice uint64 + Idle uint64 + Iowait uint64 + Irq uint64 + Nice uint64 + Softirq uint64 + StatCount int + Steal uint64 + System uint64 + Total uint64 + User uint64 + type Disk struct + Available uint64 + Free uint64 + Total uint64 + Used uint64 + type Geo interface + All func() ([]*Peer, error) + Beacon func(location Location) GeoBeacon + Distance func(from Location, distance float32) ([]*Peer, error) + Set func(location Location) error + type GeoBeacon interface + Start func() + type Location struct + Latitude float32 + Longitude float32 + type Memory struct + Free uint64 + Total uint64 + Used uint64 + type Peer struct + Id string + Location PeerLocation + type PeerLocation struct + Location Location + Timestamp int64 + type Resolver interface + LookupCNAME func(ctx context.Context, host string) (string, error) + LookupTXT func(context.Context, string) ([]string, error) + type Service interface + Resolver func() Resolver + type ServiceInfo struct + Meta map[string]string + Type ServiceType + type ServiceType string + const ServiceTypeAuth + const ServiceTypeBilling + const ServiceTypeConsole + const ServiceTypeGateway + const ServiceTypeHoarder + const ServiceTypeHttp + const ServiceTypeMonkey + const ServiceTypeP2P + const ServiceTypePatrick + const ServiceTypeQ + const ServiceTypeSeer + const ServiceTypeSubstrate + const ServiceTypeTns + const ServiceTypeUnknown + type Services []ServiceInfo + type Usage interface + AddService func(svrType ServiceType, meta map[string]string) + Announce func(services Services, nodeId, clientNodeId string, signature []byte) (response.Response, error) + Beacon func(hostname, nodeId, clientNodeId string, signature []byte) UsageBeacon + Get func(id string) (*UsageReturn, error) + Heartbeat func(usage *UsageData, hostname, nodeId, clientNodeId string, signature []byte) (response.Response, error) + List func() ([]string, error) + ListServiceId func(name string) (response.Response, error) + type UsageBeacon interface + Start func() + type UsageData struct + Cpu Cpu + Disk Disk + Memory Memory + type UsageReturn struct + Address string + AvailableDisk int + CpuCount int + CpuGuest int + CpuGuestNice int + CpuIdle int + CpuIowait int + CpuIrq int + CpuNice int + CpuSoftirq int + CpuStatCount int + CpuSteal int + CpuSystem int + CpuUser int + FreeDisk int + FreeMem int + Id string + Name string + Timestamp int + TotalCpu int + TotalDisk int + TotalMem int + Type []string + UsedDisk int + UsedMem int