Versions in this module Expand all Collapse all v0 v0.10.2 May 12, 2024 v0.10.1 Mar 17, 2024 Changes in this version + const AgentBoxStatusFmt + const BoxStatsLogCycle + const BoxStatsSampleCycle + const NsOpLogHostletRepAction + const NsOpLogHostletRepSync + var BoxInstanceNameReg = regexp.MustCompile("^([0-9a-f]{16,24})-([0-9a-f]{4})$") + var LxcFsVols = []*inapi.PbVolumeMount + var PodVolSysArchFmt = "%s/%s.%s" + var PodVolSysFmt = "%s/%s" + var StatsFeedNames = []string + var VolAgentSysDirFmt = "%s/%s/home/action/.sysinner" + var VolPodHomeFmt = "%s/%s/home/action" + func AgentBoxStatus(mnt, podId string, repId uint32) string + func ArrayInt32Equal(a, b []int32) bool + func ArrayInt32Sort(ls []int32) + func BoxInstanceName(podId string, repId uint32) string + func BoxInstanceNameParse(hostname string) (podId string, repId uint32) + func InPackHostDir(name, version, release, dist, arch string) string + func InPackMountPath(name, version string) string + func ObjPrint(name string, v interface{}) + func PodRepNetworkDomainName(podId string, repId uint32) string + func PodVolSysDir(mnt string, podId string, repId uint32) string + func PodVolSysDirArch(mnt string, podId string, repId uint32) string + func VolAgentSysDir(mnt string, podId string, repId uint32) string + func VolMountPoint(mnt string) string + func VolPodHomeDir(mnt string, podId string, repId uint32) string + func VolPodPath(mnt string, podId string, repId uint32, path string) string + type BoxDriver interface + BoxCreate func(box *BoxInstance) error + BoxExist func(box *BoxInstance) (bool, error) + BoxRemove func(box *BoxInstance) error + BoxStart func(box *BoxInstance) error + BoxStop func(box *BoxInstance) error + ImageSetup func(box *BoxInstance) error + Name func() string + Start func() error + StatsList func() []*BoxInstanceStatsFeed + StatusList func() []*BoxInstance + Stop func() error + type BoxDriverList struct + Items []BoxDriver + func (ls *BoxDriverList) Get(name string) BoxDriver + type BoxInstance struct + Apps inapi.AppInstances + BlkioDeviceBps int64 + BlkioDeviceIOps int64 + Env []inapi.EnvVar + HealthStatus inapi.HealthStatus + ID string + Name string + PackMounts []*BoxPackMount + PodID string + PodOpVersion uint32 + Replica inapi.PodOperateReplica + Retry int + SetupHosts []string + Spec inapi.PodSpecBoxBound + SpecCpuSets []int32 + SpecMounts []*inapi.PodSpecBoundMount + Stats *inapi.PbStatsSampleFeed + Status inapi.PbPodBoxStatus + SysVolSynced int64 + UpUpdated uint32 + func (inst *BoxInstance) BlkioDeviceRefresh() + func (inst *BoxInstance) CpuSets() string + func (inst *BoxInstance) ExtHosts(excludeRep bool) []string + func (inst *BoxInstance) OpActionDesired() bool + func (inst *BoxInstance) OpRepKey() string + func (inst *BoxInstance) SpecDesired() bool + func (inst *BoxInstance) StatusActionSet(op uint32) + func (inst *BoxInstance) VolumeMountsExport() []string + func (inst *BoxInstance) VolumeMountsRefresh() + func (it *BoxInstance) OpLock() bool + func (it *BoxInstance) OpUnlock() + func (it *BoxInstance) StatusLock() bool + func (it *BoxInstance) StatusUnlock() + type BoxInstanceSets struct + CpuCap int32 + CpuUsages []*SysCpuUsage + Items []*BoxInstance + VolDevices []*VolumeDeviceEntry + func (ls *BoxInstanceSets) Del(name string) + func (ls *BoxInstanceSets) DeviceGet(mnt string) string + func (ls *BoxInstanceSets) DeviceSet(mnt, dev string) string + func (ls *BoxInstanceSets) Each(fn func(item *BoxInstance)) + func (ls *BoxInstanceSets) Fix() bool + func (ls *BoxInstanceSets) Get(name string) *BoxInstance + func (ls *BoxInstanceSets) OpLockNum() int + func (ls *BoxInstanceSets) Set(item *BoxInstance) + func (ls *BoxInstanceSets) Size() int + func (ls *BoxInstanceSets) SpecCpuSetsDesired(inst *BoxInstance) bool + func (ls *BoxInstanceSets) StatusSet(item *BoxInstance) + type BoxInstanceStatsEntry struct + Name string + Value int64 + type BoxInstanceStatsFeed struct + Items []*BoxInstanceStatsEntry + Name string + Time uint32 + func (it *BoxInstanceStatsFeed) Set(name string, value int64) + type BoxPackMount struct + HostPath string + Name string + Version string + type RsyncModuleItem struct + Dir string + User string + type SysCpuUsage struct + Num int32 + Usage int + type VolumeDeviceEntry struct + Device string + Mountpoint string