Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CniRequest ¶ added in v1.7.0
type CniRequest struct { CniType string `json:"cni_type"` PodName string `json:"pod_name"` PodNamespace string `json:"pod_namespace"` ContainerID string `json:"container_id"` NetNs string `json:"net_ns"` IfName string `json:"if_name"` Provider string `json:"provider"` Routes []Route `json:"routes"` DNS types.DNS `json:"dns"` VfDriver string `json:"vf_driver"` // PciAddrs in case of using sriov DeviceID string `json:"deviceID"` // dpdk // empty dir volume for sharing vhost user unix socket VhostUserSocketVolumeName string `json:"vhost_user_socket_volume_name"` VhostUserSocketName string `json:"vhost_user_socket_name"` }
CniRequest is the cniserver request format
type CniResponse ¶ added in v1.7.0
type CniResponse struct { Protocol string `json:"protocol"` IPAddress string `json:"address"` MacAddress string `json:"mac_address"` CIDR string `json:"cidr"` Gateway string `json:"gateway"` Routes []Route `json:"routes"` Mtu int `json:"mtu"` PodNicName string `json:"nicname"` DNS types.DNS `json:"dns"` Err string `json:"error"` }
CniResponse is the cniserver response format
type CniServerClient ¶
type CniServerClient struct {
*gorequest.SuperAgent
}
CniServerClient is the client to visit cniserver
func NewCniServerClient ¶
func NewCniServerClient(socketAddress string) CniServerClient
NewCniServerClient return a new cniserver client
func (CniServerClient) Add ¶
func (csc CniServerClient) Add(podRequest CniRequest) (*CniResponse, error)
Add pod request
func (CniServerClient) Del ¶
func (csc CniServerClient) Del(podRequest CniRequest) error
Del pod request
Click to show internal directories.
Click to hide internal directories.