Version: v0.0.0-...-9649b88 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 11 Imported by: 0




View Source
const MaxRetryTimesForHTTPReq int = 6


View Source
var CloseFunc func(resp *http.Response) (err error)
View Source
var GetFunc func(url, token string) (resp *http.Response, err error)
View Source
var ReadAllFunc func(resp *http.Response) (body []byte, err error)


func CheckNetworkPlane

func CheckNetworkPlane(networkPlane string) error

func CheckVnicType

func CheckVnicType(vnicType string) error

func Close

func Close(resp *http.Response) error

func ConnectToDocker0

func ConnectToDocker0(containerID string) error

func Get

func Get(url, token string) (*http.Response, error)

func OseGet

func OseGet(url, token string) (*http.Response, error)

func ReadAll

func ReadAll(resp *http.Response) ([]byte, error)


type OseClient

type OseClient struct {
	// Header *http.Header
	ServerURL string
	OseToken  string

func (*OseClient) Get

func (self *OseClient) Get(url, token string) (int, []byte, error)

func (*OseClient) GetNodeInfo

func (self *OseClient) GetNodeInfo(nodeIP string) (*jason.Object, error)

func (*OseClient) GetNodeList

func (self *OseClient) GetNodeList(url string) ([]*jason.Object, error)

func (*OseClient) GetPod

func (self *OseClient) GetPod(podNs, podName string) (int, *jason.Object, error)

func (*OseClient) GetPodInfo

func (self *OseClient) GetPodInfo(url string) (int, *jason.Object, error)

func (*OseClient) GetPodList

func (self *OseClient) GetPodList(url string) ([]*jason.Object, error)

func (*OseClient) GetPodsOfNode

func (self *OseClient) GetPodsOfNode(nodeID string) ([]*jason.Object, error)

type OsePod

type OsePod struct {
	MangerClient manager.ManagerClient
	PodID        string
	PodType      string
	PodName      string
	PodNs        string
	HostType     string
	VnicType     string
	VMID         string
	PortList     []PortAttr

func (*OsePod) AnalyzeK8sRspd

func (self *OsePod) AnalyzeK8sRspd(pod *jason.Object) error

func (*OsePod) AnalyzeV2PodNetTemplate

func (self *OsePod) AnalyzeV2PodNetTemplate(nwjson *jason.Object) error

type PortAttr

type PortAttr struct {
	NetworkName  string
	NetworkPlane string
	PortName     string
	VnicType     string
	Accelerate   string
	NetworkID    string
	PublicNet    bool
	Physical     bool

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL