Documentation ¶
Index ¶
- Constants
- func ListNetworks() (ret []string)
- func SaveConfig(config Config, p string) error
- type AdminClient
- type AutoPeeringSpec
- type CellDiscoverySpec
- type CentralDiscoverySpec
- type Config
- type Daemon
- type DiscoverySpec
- type EthernetTransportSpec
- type LocalDiscoverySpec
- type NetworkSpec
- type Params
- type PeerSpec
- type PeerStore
- type StatusRes
- type TransportAddr
- type TransportSpec
- type UDPTransportSpec
Constants ¶
View Source
const DefaultAPIEndpoint = "http://127.0.0.1:2560"
Variables ¶
This section is empty.
Functions ¶
func ListNetworks ¶
func ListNetworks() (ret []string)
func SaveConfig ¶ added in v0.0.3
Types ¶
type AdminClient ¶ added in v0.0.6
func NewAdminClient ¶ added in v0.0.6
func NewAdminClient(endpoint string) (AdminClient, error)
type AutoPeeringSpec ¶
type AutoPeeringSpec struct { }
type CellDiscoverySpec ¶
type CentralDiscoverySpec ¶ added in v0.0.3
type Config ¶
type Config struct { PrivateKeyPath string `yaml:"private_key_path"` APIEndpoint string `yaml:"api_endpoint"` Network NetworkSpec `yaml:"network"` Transports []TransportSpec `yaml:"transports"` Peers []PeerSpec `yaml:"peers"` Discovery []DiscoverySpec `yaml:"discovery"` AutoPeering []AutoPeeringSpec `yaml:"autopeering"` }
func DefaultConfig ¶
func DefaultConfig() Config
func LoadConfig ¶
func (Config) GetAPIAddr ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
func (*Daemon) DoWithServer ¶
type DiscoverySpec ¶
type DiscoverySpec struct { Cell *CellDiscoverySpec `yaml:"cell,omitempty"` Local *LocalDiscoverySpec `yaml:"local,omitempty"` Central *CentralDiscoverySpec `yaml:"central,omitempty"` }
type EthernetTransportSpec ¶
type EthernetTransportSpec string
type LocalDiscoverySpec ¶
type LocalDiscoverySpec struct {
MulticastAddr string `yaml:"multicast_addr"`
}
type NetworkSpec ¶
type NetworkSpec struct { BeaconNet *struct{} `yaml:"beaconnet,omitempty"` OneHop *struct{} `yaml:"onehop,omitempty"` }
func DefaultNetwork ¶ added in v0.0.3
func DefaultNetwork() NetworkSpec
type Params ¶
type Params struct { MainNodeParams mesh256.Params DiscoveryServices []discovery.Service AutoPeeringServices []autopeering.Service APIAddr string TransportAddrParser p2p.AddrParser[TransportAddr] }
type PeerStore ¶ added in v0.0.3
type PeerStore = peers.Store[TransportAddr]
type StatusRes ¶ added in v0.0.6
type StatusRes struct { MainAddr inet256.Addr `json:"main_addr"` TransportAddrs []string `json:"transport_addrs"` Peers []mesh256.PeerStatus `json:"peers"` }
type TransportAddr ¶ added in v0.0.3
type TransportAddr = mesh256.TransportAddr
type TransportSpec ¶
type TransportSpec struct { UDP *UDPTransportSpec `yaml:"udp,omitempty"` Ethernet *EthernetTransportSpec `yaml:"ethernet,omitempty"` }
type UDPTransportSpec ¶
type UDPTransportSpec string
Click to show internal directories.
Click to hide internal directories.