Documentation
¶
Index ¶
- Constants
- Variables
- type AdminWebConfig
- type CBNetworkConfig
- type CLADNetSpecification
- type Config
- type ETCDConfig
- type GRPCConfig
- type HostNetworkInformation
- type IP
- type InterHostNetworkStatus
- type NetworkInterface
- type NetworkStatus
- type NetworkingRule
- func (netrule *NetworkingRule) AppendRule(ID string, privateIPv4Network string, privateIPv4Address string, ...)
- func (netrule NetworkingRule) Contain(x string) bool
- func (netrule NetworkingRule) GetIndexOfCBNet(hostIPv4Network string) int
- func (netrule NetworkingRule) GetIndexOfCBNetIP(hostIPAddress string) int
- func (netrule NetworkingRule) GetIndexOfHostID(id string) int
- func (netrule NetworkingRule) GetIndexOfPublicIP(publicIP string) int
- func (netrule *NetworkingRule) UpdateRule(id string, privateIPv4Network string, privateIPv4Address string, ...)
- type Peer
- type TestSpecification
- type WebsocketMessageFrame
Constants ¶
const ( // Running is const for the running state Running = "running" // Suspended is const for the suspended state Suspended = "suspended" )
Variables ¶
var CBLogger *logrus.Logger
CBLogger represents a logger to show execution processes according to the logging level.
Functions ¶
This section is empty.
Types ¶
type AdminWebConfig ¶
AdminWebConfig represents the configuration information for a AdminWeb
type CBNetworkConfig ¶
type CBNetworkConfig struct { CLADNetID string `yaml:"cladnet_id"` HostID string `yaml:"host_id"` IsEncrypted bool `yaml:"is_encrypted"` }
CBNetworkConfig represents the configuration information for a cloud adaptive network
type CLADNetSpecification ¶
type CLADNetSpecification struct { ID string `json:"id"` Name string `json:"name"` Ipv4AddressSpace string `json:"ipv4AddressSpace"` Description string `json:"description"` }
CLADNetSpecification represents the specification of a Cloud Adaptive Network (CLADNet).
type Config ¶
type Config struct { ETCD ETCDConfig `yaml:"etcd_cluster"` AdminWeb AdminWebConfig `yaml:"admin_web"` CBNetwork CBNetworkConfig `yaml:"cb_network"` GRPC GRPCConfig `yaml:"grpc"` }
Config represents the configuration information for cb-network
func LoadConfig ¶
LoadConfig represents a function to read the configuration information from a file
type ETCDConfig ¶
type ETCDConfig struct {
Endpoints []string `yaml:"endpoints"`
}
ETCDConfig represents the configuration information for a etcd cluster
type GRPCConfig ¶
type GRPCConfig struct { ServiceEndpoint string `yaml:"service_endpoint"` ServerPort string `yaml:"server_port"` GatewayPort string `yaml:"gateway_port"` }
GRPCConfig represnets the configuration information for a gRPC server
type HostNetworkInformation ¶
type HostNetworkInformation struct { IsEncrypted bool `json:"isEncrypted"` PublicIP string `json:"publicIPAddress"` PrivateIPv4Networks []string `json:"privateIPv4Networks"` }
HostNetworkInformation represents the network information of VM, such as public IP and private networks
type IP ¶
type IP struct { Version string `json:"Version"` IPAddress string `json:"IP"` IPv4Network string `json:"IPv4Network"` }
IP represents a set of information related to IP address
type InterHostNetworkStatus ¶
type InterHostNetworkStatus struct { SourceIP string `json:"sourceIP"` SourceID string `json:"sourceID"` DestinationIP string `json:"destinationIP"` DestinationID string `json:"destinationID"` MininumRTT float64 `json:"minimunRTT"` AverageRTT float64 `json:"averageRTT"` MaximumRTT float64 `json:"maximumRTT"` StdDevRTT float64 `json:"stddevRTT"` PacketsReceive int `json:"packetsReceive"` PacketsLoss int `json:"packetLoss"` BytesReceived int `json:"bytesReceived"` }
InterHostNetworkStatus represents the network performance between two virtual machines in a CLADNet.
type NetworkInterface ¶
NetworkInterface represents a network interface in a system with assigned IPs (Typically IPv4, and IPv6)
type NetworkStatus ¶
type NetworkStatus struct {
InterHostNetworkStatus []InterHostNetworkStatus `json:"interHostNetworkStatus"`
}
NetworkStatus represents the statistics of a Cloud Adaptive Network (CLADNet).
type NetworkingRule ¶
type NetworkingRule struct { CLADNetID string `json:"CLADNetID"` HostID []string `json:"hostID"` HostIPv4Network []string `json:"hostIPv4Network"` HostIPAddress []string `json:"hostIPAddress"` PublicIPAddress []string `json:"publicIPAddress"` }
NetworkingRule represents a networking rule of the cloud adaptive network. It is used for tunneling between hosts(e.g., VMs).
func (*NetworkingRule) AppendRule ¶
func (netrule *NetworkingRule) AppendRule(ID string, privateIPv4Network string, privateIPv4Address string, publicIPv4Addres string)
AppendRule represents a function to append a rule to the NetworkingRule
func (NetworkingRule) Contain ¶
func (netrule NetworkingRule) Contain(x string) bool
Contain represents a function to check if the host exists or not
func (NetworkingRule) GetIndexOfCBNet ¶
func (netrule NetworkingRule) GetIndexOfCBNet(hostIPv4Network string) int
GetIndexOfCBNet represents a function to find and return an index of HostIPv4Network from NetworkingRule
func (NetworkingRule) GetIndexOfCBNetIP ¶
func (netrule NetworkingRule) GetIndexOfCBNetIP(hostIPAddress string) int
GetIndexOfCBNetIP represents a function to find and return an index of HostIPAddress from NetworkingRule
func (NetworkingRule) GetIndexOfHostID ¶ added in v0.0.8
func (netrule NetworkingRule) GetIndexOfHostID(id string) int
GetIndexOfHostID represents a function to find and return an index of HostID from NetworkingRule
func (NetworkingRule) GetIndexOfPublicIP ¶
func (netrule NetworkingRule) GetIndexOfPublicIP(publicIP string) int
GetIndexOfPublicIP represents a function to find and return an index of PublicIPAddress from NetworkingRule
func (*NetworkingRule) UpdateRule ¶
func (netrule *NetworkingRule) UpdateRule(id string, privateIPv4Network string, privateIPv4Address string, publicIPv4Address string)
UpdateRule represents a function to update a rule to the NetworkingRule
type Peer ¶ added in v0.0.8
type Peer struct { CLADNetID string `json:"cladNetID"` HostID string `json:"hostID"` PrivateIPv4Network string `json:"privateIPv4Network"` PrivateIPv4Address string `json:"privateIPv4Address"` PublicIPv4Address string `json:"publicIPv4Address"` State string `json:"state"` }
Peer represents a host's rule of the cloud adaptive network.
type TestSpecification ¶
type TestSpecification struct { CLADNetID string `json:"CLADNetID"` TrialCount int `json:"trialCount"` }
TestSpecification represents the specification of a Cloud Adaptive Network (CLADNet).
type WebsocketMessageFrame ¶
WebsocketMessageFrame represents a message struct to communicate web server and client.