Documentation ¶
Index ¶
- Variables
- type AdminWebConfig
- type CBNetworkConfig
- type CLADNetSpecification
- type CloudInformation
- type Config
- type ETCDConfig
- type HostConfig
- type HostNetworkInformation
- type InterHostNetworkStatus
- type NetworkInterface
- type NetworkStatus
- type NetworkingRule
- func (netrule *NetworkingRule) AppendRule(id, name, peerIP, selectedIP, peerScope, state string)
- func (netrule NetworkingRule) Contain(x string) bool
- func (netrule NetworkingRule) GetIndexOfHostID(id string) int
- func (netrule NetworkingRule) GetIndexOfHostName(name string) int
- func (netrule NetworkingRule) GetIndexOfPeerIP(hostIPAddress string) int
- func (netrule NetworkingRule) GetIndexOfSelectedIP(publicIP string) int
- func (netrule *NetworkingRule) UpdateRule(id, name, peerIP, selectedIP, peerScope, state string)
- type Peer
- type Peers
- type ServiceConfig
- type TestSpecification
- type WebsocketMessageFrame
Constants ¶
This section is empty.
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"` Host HostConfig `yaml:"host"` }
CBNetworkConfig represents the configuration information for a cloud adaptive network
type CLADNetSpecification ¶
type CLADNetSpecification struct { CladnetID string `json:"cladnetId"` Name string `json:"name"` Ipv4AddressSpace string `json:"ipv4AddressSpace"` Description string `json:"description"` RuleType string `json:"ruleType"` }
CLADNetSpecification represents the specification of a Cloud Adaptive Network (CLADNet).
type CloudInformation ¶ added in v0.0.14
type CloudInformation struct { ProviderName string `json:"providerName"` RegionID string `json:"regionId"` AvailabilityZoneID string `json:"availabilityZoneId"` VirtualNetworkID string `json:"virtualNetworkId"` SubnetID string `json:"subnetId"` }
CloudInformation represents cloud information.
type Config ¶
type Config struct { ETCD ETCDConfig `yaml:"etcd_cluster"` AdminWeb AdminWebConfig `yaml:"admin_web"` CBNetwork CBNetworkConfig `yaml:"cb_network"` Service ServiceConfig `yaml:"service"` ServiceCallMethod string `yaml:"service_call_method"` }
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 HostConfig ¶ added in v0.0.11
type HostConfig struct { Name string `yaml:"name"` NetworkInterfaceName string `yaml:"network_interface_name"` TunnelingPort string `yaml:"tunneling_port"` IsEncrypted bool `yaml:"is_encrypted"` }
HostConfig represents the configuration information for a host in a cloud adaptvie network
type HostNetworkInformation ¶
type HostNetworkInformation struct { HostName string `json:"hostName"` IsEncrypted bool `json:"isEncrypted"` PublicIP string `json:"publicIPAddress"` NetworkInterfaces []NetworkInterface `json:"networkInterfaces"` }
HostNetworkInformation represents the network information of VM, such as public IP and private networks
type InterHostNetworkStatus ¶
type InterHostNetworkStatus struct { SourceIP string `json:"sourceIP"` SourceName string `json:"sourceName"` DestinationIP string `json:"destinationIP"` DestinationName string `json:"destinationName"` 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 ¶
type NetworkInterface struct { Name string `json:"name"` Version string `json:"version"` IPv4 string `json:"ipv4"` IPv4CIDR string `json:"ipv4Cidr"` IPv6 string `json:"ipv6"` IPv6CIDR string `json:"ipv6Cidr"` }
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"` HostName []string `json:"hostName"` PeerIP []string `json:"peerIP"` SelectedIP []string `json:"selectedIP"` PeerScope []string `json:"peerScope"` State []string `json:"state"` }
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, name, peerIP, selectedIP, peerScope, state 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) GetIndexOfHostID ¶
func (netrule NetworkingRule) GetIndexOfHostID(id string) int
GetIndexOfHostID represents a function to find and return an index of HostID from NetworkingRule
func (NetworkingRule) GetIndexOfHostName ¶ added in v0.0.11
func (netrule NetworkingRule) GetIndexOfHostName(name string) int
GetIndexOfHostName represents a function to find and return an index of HostID from NetworkingRule
func (NetworkingRule) GetIndexOfPeerIP ¶ added in v0.0.14
func (netrule NetworkingRule) GetIndexOfPeerIP(hostIPAddress string) int
GetIndexOfPeerIP represents a function to find and return an index of a peer IP address from NetworkingRule
func (NetworkingRule) GetIndexOfSelectedIP ¶ added in v0.0.14
func (netrule NetworkingRule) GetIndexOfSelectedIP(publicIP string) int
GetIndexOfSelectedIP represents a function to find and return an index of a selected IP address from NetworkingRule
func (*NetworkingRule) UpdateRule ¶
func (netrule *NetworkingRule) UpdateRule(id, name, peerIP, selectedIP, peerScope, state string)
UpdateRule represents a function to update a rule to the NetworkingRule
type Peer ¶
type Peer struct { CladnetID string `json:"cladnetId"` HostID string `json:"hostId"` HostName string `json:"hostName"` HostPrivateIPv4CIDR string `json:"hostPrivateIpv4Cidr"` HostPrivateIP string `json:"hostPrivateIp"` HostPublicIP string `json:"hostPublicIp"` IPv4CIDR string `json:"ipv4Cidr"` IP string `json:"ip"` State string `json:"state"` Details CloudInformation `json:"details"` }
Peer represents a host participating in a cloud adaptive network.
type Peers ¶ added in v0.0.14
type Peers struct {
Peers []Peer `json:"peers"`
}
Peers represents a list of peers.
type ServiceConfig ¶ added in v0.0.12
ServiceConfig represnets the configuration information for a gRPC server
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.