// KeepOnly returns a new CPUDetails object with only the supplied cpus.
546322
func (d CPUDetails) KeepOnly(cpus cpuset.CPUSet) CPUDetails {
	result := CPUDetails{}
	for cpu, info := range d {
		if cpus.Contains(cpu) {
			result[cpu] = info
		}
	}
	return result
}
677538
func (e *Encoder) KeepZeros(z bool) *Encoder {
	e.z = z
	return e
}
1044871
func (soc *Socket) GetIpv4only() (bool, error) {
	v, err := soc.getInt(C.ZMQ_IPV4ONLY)
	return v != 0, err
}
929296
func KeepAlive(t time.Duration) TransportOption {
	return func(options *transportOptions) {
		options.keepAlive = t
	}
}
422744
func (m *MockMachineProvisioner) KeepInstance() (bool, error) {
	ret := m.ctrl.Call(m, "KeepInstance")
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
891241
func (s *OptionGroupOption) SetVpcOnly(v bool) *OptionGroupOption {
	s.VpcOnly = &v
	return s
}
89984
func (d CPUDetails) CPUs() cpuset.CPUSet {
	b := cpuset.NewBuilder()
	for cpuID := range d {
		b.Add(cpuID)
	}
	return b.Result()
}
538874
func (prof *Profiler) Serialize(cpus *x.CPUs) ([]byte, error) {
	return json.Marshal(cpus)
}
972938
func (p *Profiler) Serialize(cpus *cpux.CPUs) []byte {
	// ensure the Builder is in a usable state.
	p.Builder.Reset()
	possible := p.Builder.CreateString(cpus.Possible)
	online := p.Builder.CreateString(cpus.Online)
	offline := p.Builder.CreateString(cpus.Offline)
	present := p.Builder.CreateString(cpus.Present)
	uoffs := make([]fb.UOffsetT, len(cpus.CPU))
	for i, cpu := range cpus.CPU {
		uoffs[i] = p.SerializeCPU(&cpu)
	}
	structs.CPUsStartCPUVector(p.Builder, len(uoffs))
	for i := len(uoffs) - 1; i >= 0; i-- {
		p.Builder.PrependUOffsetT(uoffs[i])
	}
	cpusV := p.Builder.EndVector(len(uoffs))
	structs.CPUsStart(p.Builder)
	structs.CPUsAddSockets(p.Builder, cpus.Sockets)
	structs.CPUsAddPossible(p.Builder, possible)
	structs.CPUsAddOnline(p.Builder, online)
	structs.CPUsAddOffline(p.Builder, offline)
	structs.CPUsAddPresent(p.Builder, present)
	structs.CPUsAddCPU(p.Builder, cpusV)
	p.Builder.Finish(structs.CPUsEnd(p.Builder))
	b := p.Builder.Bytes[p.Builder.Head():]
	// copy them (otherwise gets lost in reset)
	tmp := make([]byte, len(b))
	copy(tmp, b)
	return tmp
}
282335
func (Ctx *Context) CpupoolCpuremove(Poolid uint32, Cpu int) (err error) {
	err = Ctx.CheckOpen()
	if err != nil {
		return
	}

	ret := C.libxl_cpupool_cpuremove(Ctx.ctx, C.uint32_t(Poolid), C.int(Cpu))
	if ret != 0 {
		err = Error(-ret)
		return
	}

	return
}
199151
func Serialize(cpus *cpux.CPUs) (p []byte) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std = NewProfiler()
	}
	return std.Serialize(cpus)
}
863706
func (te *TxEngine) StopGently() {
	te.stateLock.Lock()
	defer te.stateLock.Unlock()
	te.close(false)
	te.state = NotServing
}
200901
func KeepaliveParams(kp keepalive.ServerParameters) ServerOption {
	if kp.Time > 0 && kp.Time < time.Second {
		grpclog.Warning("Adjusting keepalive ping interval to minimum period of 1s")
		kp.Time = time.Second
	}

	return newFuncServerOption(func(o *serverOptions) {
		o.keepaliveParams = kp
	})
}
500962
func (s *ScanService) KeepAlive(keepAlive string) *ScanService {
	s.keepAlive = keepAlive
	return s
}
305484
func (Ctx *Context) CpupoolInfo(Poolid uint32) (pool CpupoolInfo) {
	err := Ctx.CheckOpen()
	if err != nil {
		return
	}

	var c_cpupool C.libxl_cpupoolinfo

	ret := C.libxl_cpupool_info(Ctx.ctx, &c_cpupool, C.uint32_t(Poolid))
	if ret != 0 {
		err = Error(-ret)
		return
	}
	defer C.libxl_cpupoolinfo_dispose(&c_cpupool)

	pool = c_cpupool.toGo()

	return
}
1253082
func (dc *DeploymentController) syncStatusOnly(d *apps.Deployment, rsList []*apps.ReplicaSet) error {
	newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, rsList, false)
	if err != nil {
		return err
	}

	allRSs := append(oldRSs, newRS)
	return dc.syncDeploymentStatus(allRSs, newRS, d)
}
1133165
func (a *ActionWrap) WhenOnly(fx func(b interface{})) ActionInterface {
	return a.action.WhenOnly(fx)
}