cluster

package
v1.20.11 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//syncStorageErr = "ZOOKEEPERErr"
	SyncSuccess = "SUCCESS"
	SyncFailure = "FAILURE"

	DataTypeApp       = "Application"
	DataTypeTaskGroup = "TaskGroup"
	DataTypeCfg       = "Configmap"
	//DataTypeSecret    = "Secret"
	DataTypeDeploy             = "Deployment"
	DataTypeSvr                = "Service"
	DataTypeExpSVR             = "ExportService"
	DataTypeIPPoolStatic       = "IPPoolStatic"
	DataTypeIPPoolStaticDetail = "IPPoolStaticDetail"
)

Variables

View Source
var (
	SyncTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "bkbcs_datawatch",
		Subsystem: "mesos",
		Name:      "sync_total",
		Help:      "The total number of data sync event.",
	}, []string{"datatype", "action", "status"})
)

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	Run(cxt context.Context)  //start cluster
	Sync(tp string) error     //ready to sync data, type like services, pods and etc.
	Stop()                    //stop cluster
	GetClusterStatus() string //get curr status
}

Cluster is interface for reading Cluster info

type DataExister

type DataExister interface {
	IsExist(data interface{}) bool
}

DataExister checker interface for data exist

type EventHandler

type EventHandler interface {
	AddEvent(obj interface{})
	DeleteEvent(obj interface{})
	UpdateEvent(old, cur interface{})
}

EventHandler hold event interface for All Watch

type ReportFunc

type ReportFunc func(data *types.BcsSyncData) error

ReportFunc report function for handle detail report data

type Reporter

type Reporter interface {
	ReportData(data *types.BcsSyncData) error
}

Reporter for report data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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