status

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NetworkRouteDataVersion1 = 0x01
)

Variables

View Source
var (

	// local host
	Host = inapi.ResHost{
		Meta:    &inapi.ObjectMeta{},
		Operate: &inapi.ResHostOperate{},
		Spec:    &inapi.ResHostSpec{},
		Status:  &inapi.ResHostStatus{},
	}
	LocalZoneMasterList inapi.ResZoneMasterList

	// local zone
	ZoneId               string
	Zone                 *inapi.ResZone
	ZoneMasterList       = inapi.ResZoneMasterList{}
	ZoneHostList         = &inapi.ResHostList{}
	ZoneHostListImported = false
	ZoneHostSecretKeys   types.KvPairs
	ZonePodList          = &inapi.PodList{}
	ZonePodStatusList    = &inapi.PodStatusList{}
	ZonePodServices      struct {
		Items []*inapi.AppServicePod `json:"items"`
	}

	ZoneSysConfigGroupList inapi.SysConfigGroupList
	ZoneLeaded             int64 = 0
	ZoneScheduled          int64 = 0
	ZoneMailManager              = hmsg.NewMailManager()
	ZoneNetworkManager           = newStatusNetwork()

	ZoneDrivers = []inapi.ZoneDriver{}

	GlobalZones    ResZoneList
	GlobalHostList inapi.ResHostList
)

Functions

func GlobalCellDel

func GlobalCellDel(zoneId, cellId string)

func GlobalZone

func GlobalZone(zoneId string) *inapi.ResZone

func GlobalZoneCell

func GlobalZoneCell(zoneId, cellId string) *inapi.ResCell

func GlobalZoneDel

func GlobalZoneDel(zoneId string)

func GlobalZoneSync

func GlobalZoneSync(zone *inapi.ResZone) (*inapi.ResZone, bool)

func HostletReady

func HostletReady() bool

func IsZoneMaster

func IsZoneMaster() bool

func IsZoneMasterLeader

func IsZoneMasterLeader() bool

func Setup

func Setup() error

func ZoneDriver

func ZoneDriver(name string) inapi.ZoneDriver

func ZoneHostIp

func ZoneHostIp(hostId string) string

func ZoneMasterLeadSeconds

func ZoneMasterLeadSeconds() int64

func ZoneMasters

func ZoneMasters() []string

func ZonePodChargeAccessKey

func ZonePodChargeAccessKey() *hauth.AccessKey

func ZonePodServicesFlush

func ZonePodServicesFlush()

Types

type NetworkVPCAlloc

type NetworkVPCAlloc func(chg bool, brNet, ipNet string) bool

type ResZoneList

type ResZoneList []*inapi.ResZone

type StatusContext

type StatusContext struct {
	Zone              *inapi.ResZone
	ZoneHostList      *inapi.ResHostList
	ZonePodList       *inapi.PodList
	ZonePodStatusList *inapi.PodStatusList
	IsZoneLeader      bool
	ZoneMailManager   *hmsg.MailManager
	Host              *inapi.ResHost
}

func StatusContextRefresh

func StatusContextRefresh() *StatusContext

type StatusNetwork

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

func (*StatusNetwork) HostAlloc

func (it *StatusNetwork) HostAlloc(hostId string, cb NetworkVPCAlloc) error

func (*StatusNetwork) HostSetup

func (it *StatusNetwork) HostSetup(hostId, hostPeerIp, bridgeIp, instanceIpNet string) error

func (*StatusNetwork) InstanceAlloc

func (it *StatusNetwork) InstanceAlloc(hostId, instanceId string, cb NetworkVPCAlloc) error

func (*StatusNetwork) InstanceSetup

func (it *StatusNetwork) InstanceSetup(hostId string,
	podId string, repId uint32, instanceIp string) error

func (*StatusNetwork) Ready

func (it *StatusNetwork) Ready(b bool)

func (*StatusNetwork) ZoneNetworkMap

func (it *StatusNetwork) ZoneNetworkMap() *inapi.ZoneNetworkMap

func (*StatusNetwork) ZoneSetup

func (it *StatusNetwork) ZoneSetup(bridgeIpNet, instanceIpNet string) error

Jump to

Keyboard shortcuts

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