driver

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPPortGap = "+"
)

Variables

This section is empty.

Functions

func GetApplicationName

func GetApplicationName(metric *types.Metric) string

func GetFilePath

func GetFilePath(tempDir, namespace string, ct types.ClusterType) (target string, err error)

func GetIPMetaFromDynamic

func GetIPMetaFromDynamic(raw []byte, metric *types.Metric) (ipMeta map[string]btypes.ObjectMeta, err error)

func GetK8SIPMeta

func GetK8SIPMeta(raw []byte, metric *types.Metric) (ipMeta map[string]btypes.ObjectMeta, err error)

func GetMesosIPMeta

func GetMesosIPMeta(raw []byte, metric *types.Metric) (ipMeta map[string]btypes.ObjectMeta, err error)

func LoadResourceJson

func LoadResourceJson(tempDir, namespace string, ct types.ClusterType) (*simplejson.Json, error)

Types

type ClusterDriver

type ClusterDriver interface {
	GetCollectorTypeName() string
	GetIPMeta() (map[string]btypes.ObjectMeta, error)
	GetApplicationJson(imageBase string) (*simplejson.Json, error)
	CreateApplication(data []byte) error
	DeleteApplication(data []byte) error
}

func GetClusterDriver

func GetClusterDriver(m *types.Metric, c *config.Config, s storage.Storage, r route.Route, z zk.Zk) (ClusterDriver, error)

func NewComponentsDriver

func NewComponentsDriver(config *config.Config, zk zk.Zk) ClusterDriver

func NewK8SDriver

func NewK8SDriver(m *types.Metric, config *config.Config, s storage.Storage, r route.Route) ClusterDriver

func NewMesosDriver

func NewMesosDriver(m *types.Metric, config *config.Config, s storage.Storage, r route.Route) ClusterDriver

type ComponentsDriver

type ComponentsDriver struct {
	// contains filtered or unexported fields
}

func (*ComponentsDriver) CreateApplication

func (cd *ComponentsDriver) CreateApplication(data []byte) error

func (*ComponentsDriver) DeleteApplication

func (cd *ComponentsDriver) DeleteApplication(data []byte) error

func (*ComponentsDriver) GetApplicationJson

func (cd *ComponentsDriver) GetApplicationJson(string) (*simplejson.Json, error)

func (*ComponentsDriver) GetCollectorTypeName

func (cd *ComponentsDriver) GetCollectorTypeName() string

func (*ComponentsDriver) GetIPMeta

func (cd *ComponentsDriver) GetIPMeta() (map[string]btypes.ObjectMeta, error)

type K8SDriver

type K8SDriver struct {
	// contains filtered or unexported fields
}

K8S metric driver

func (*K8SDriver) CreateApplication

func (kd *K8SDriver) CreateApplication(data []byte) (err error)

func (*K8SDriver) DeleteApplication

func (kd *K8SDriver) DeleteApplication(data []byte) (err error)

func (*K8SDriver) GetApplicationJson

func (kd *K8SDriver) GetApplicationJson(imageBase string) (js *simplejson.Json, err error)

func (*K8SDriver) GetCollectorTypeName

func (kd *K8SDriver) GetCollectorTypeName() string

func (*K8SDriver) GetIPMeta

func (kd *K8SDriver) GetIPMeta() (map[string]btypes.ObjectMeta, error)

type MesosDriver

type MesosDriver struct {
	// contains filtered or unexported fields
}

Mesos metric driver

func (*MesosDriver) CreateApplication

func (md *MesosDriver) CreateApplication(data []byte) (err error)

func (*MesosDriver) DeleteApplication

func (md *MesosDriver) DeleteApplication(data []byte) (err error)

func (*MesosDriver) GetApplicationJson

func (md *MesosDriver) GetApplicationJson(imageBase string) (js *simplejson.Json, err error)

func (*MesosDriver) GetCollectorTypeName

func (md *MesosDriver) GetCollectorTypeName() string

func (*MesosDriver) GetIPMeta

func (md *MesosDriver) GetIPMeta() (map[string]btypes.ObjectMeta, error)

type ResourceData

type ResourceData struct {
	Name string `json:"resourceName"`
}

type StoragePodIf

type StoragePodIf struct {
	Namespace string `json:"namespace"`
	Data      struct {
		Metadata btypes.ObjectMeta `json:"metadata"`
		Status   struct {
			HostIP string `json:"hostIP"`
			PodIP  string `json:"podIP"`
			Phase  string `json:"phase"`
		} `json:"status"`
	} `json:"data"`
}

type StorageTaskGroupIf

type StorageTaskGroupIf struct {
	Namespace string              `json:"namespace"`
	Data      btypes.BcsPodStatus `json:"data"`
}

Jump to

Keyboard shortcuts

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