rpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugInmemoryRegistry bool = false
View Source
var DebugRPCRegistry bool = false

Functions

func NewRPCServer

func NewRPCServer(reg registry.Registry, addr string) (*rpcserver, error)

Types

type RPCRegistry

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

func NewRPCRegistry

func NewRPCRegistry(dialer func(string, time.Duration) (net.Conn, error)) *RPCRegistry

func (*RPCRegistry) ClearUnitHeartbeat

func (r *RPCRegistry) ClearUnitHeartbeat(unitName string)

func (*RPCRegistry) Close

func (r *RPCRegistry) Close()

func (*RPCRegistry) Connect

func (r *RPCRegistry) Connect()

func (*RPCRegistry) CreateMachineState

func (r *RPCRegistry) CreateMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error)

func (*RPCRegistry) CreateUnit

func (r *RPCRegistry) CreateUnit(j *job.Unit) error

func (*RPCRegistry) DeleteMachineMetadata

func (r *RPCRegistry) DeleteMachineMetadata(machID string, key string) error

func (*RPCRegistry) DestroyUnit

func (r *RPCRegistry) DestroyUnit(unitName string) error

func (*RPCRegistry) EngineVersion

func (r *RPCRegistry) EngineVersion() (int, error)

func (*RPCRegistry) IsRegistryReady

func (r *RPCRegistry) IsRegistryReady() bool

func (*RPCRegistry) LatestDaemonVersion

func (r *RPCRegistry) LatestDaemonVersion() (*semver.Version, error)

func (*RPCRegistry) MachineState

func (r *RPCRegistry) MachineState(machID string) (machine.MachineState, error)

func (*RPCRegistry) Machines

func (r *RPCRegistry) Machines() ([]machine.MachineState, error)

func (*RPCRegistry) RemoveMachineState

func (r *RPCRegistry) RemoveMachineState(machID string) error

func (*RPCRegistry) RemoveUnitState

func (r *RPCRegistry) RemoveUnitState(unitName string) error

func (*RPCRegistry) SaveUnitState

func (r *RPCRegistry) SaveUnitState(unitName string, unitState *unit.UnitState, ttl time.Duration)

func (*RPCRegistry) Schedule

func (r *RPCRegistry) Schedule() ([]job.ScheduledUnit, error)

func (*RPCRegistry) ScheduleUnit

func (r *RPCRegistry) ScheduleUnit(unitName, machID string) error

func (*RPCRegistry) ScheduledUnit

func (r *RPCRegistry) ScheduledUnit(unitName string) (*job.ScheduledUnit, error)

func (*RPCRegistry) SetMachineMetadata

func (r *RPCRegistry) SetMachineMetadata(machID string, key string, value string) error

func (*RPCRegistry) SetMachineState

func (r *RPCRegistry) SetMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error)

func (*RPCRegistry) SetUnitTargetState

func (r *RPCRegistry) SetUnitTargetState(unitName string, state job.JobState) error

func (*RPCRegistry) Status

func (*RPCRegistry) Unit

func (r *RPCRegistry) Unit(unitName string) (*job.Unit, error)

func (*RPCRegistry) UnitHeartbeat

func (r *RPCRegistry) UnitHeartbeat(unitName, machID string, ttl time.Duration) error

func (*RPCRegistry) UnitState

func (r *RPCRegistry) UnitState(unitName string) (*unit.UnitState, error)

func (*RPCRegistry) UnitStates

func (r *RPCRegistry) UnitStates() ([]*unit.UnitState, error)

func (*RPCRegistry) Units

func (r *RPCRegistry) Units() ([]job.Unit, error)

func (*RPCRegistry) UnscheduleUnit

func (r *RPCRegistry) UnscheduleUnit(unitName, machID string) error

func (*RPCRegistry) UpdateEngineVersion

func (r *RPCRegistry) UpdateEngineVersion(from, to int) error

func (*RPCRegistry) UseEtcdRegistry

func (r *RPCRegistry) UseEtcdRegistry() bool

type RegistryMux

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

func NewRegistryMux

func NewRegistryMux(etcdRegistry *registry.EtcdRegistry, localMachine machine.Machine, leaseManager lease.Manager) *RegistryMux

func (*RegistryMux) ClearUnitHeartbeat

func (r *RegistryMux) ClearUnitHeartbeat(name string)

func (*RegistryMux) ConnectToRegistry

func (r *RegistryMux) ConnectToRegistry(e *engine.Engine)

ConnectToRegistry allows to disable_engine fleet agents to adapt its Registry to fleet leader changes regardless of whether is etcd or gRPC based.

func (*RegistryMux) CreateMachineState

func (r *RegistryMux) CreateMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error)

func (*RegistryMux) CreateUnit

func (r *RegistryMux) CreateUnit(unit *job.Unit) error

func (*RegistryMux) DeleteMachineMetadata

func (r *RegistryMux) DeleteMachineMetadata(machID string, key string) error

func (*RegistryMux) DestroyUnit

func (r *RegistryMux) DestroyUnit(unit string) error

func (*RegistryMux) EngineChanged

func (r *RegistryMux) EngineChanged(newEngine machine.MachineState)

func (*RegistryMux) EngineVersion

func (r *RegistryMux) EngineVersion() (int, error)

func (*RegistryMux) IsRegistryReady

func (r *RegistryMux) IsRegistryReady() bool

func (*RegistryMux) LatestDaemonVersion

func (r *RegistryMux) LatestDaemonVersion() (*semver.Version, error)

func (*RegistryMux) MachineState

func (r *RegistryMux) MachineState(machID string) (machine.MachineState, error)

func (*RegistryMux) Machines

func (r *RegistryMux) Machines() ([]machine.MachineState, error)

func (*RegistryMux) RemoveMachineState

func (r *RegistryMux) RemoveMachineState(machID string) error

func (*RegistryMux) RemoveUnitState

func (r *RegistryMux) RemoveUnitState(jobName string) error

func (*RegistryMux) SaveUnitState

func (r *RegistryMux) SaveUnitState(jobName string, unitState *unit.UnitState, ttl time.Duration)

func (*RegistryMux) Schedule

func (r *RegistryMux) Schedule() ([]job.ScheduledUnit, error)

func (*RegistryMux) ScheduleUnit

func (r *RegistryMux) ScheduleUnit(name string, machID string) error

func (*RegistryMux) ScheduledUnit

func (r *RegistryMux) ScheduledUnit(name string) (*job.ScheduledUnit, error)

func (*RegistryMux) SetMachineMetadata

func (r *RegistryMux) SetMachineMetadata(machID string, key string, value string) error

func (*RegistryMux) SetMachineState

func (r *RegistryMux) SetMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error)

func (*RegistryMux) SetUnitTargetState

func (r *RegistryMux) SetUnitTargetState(name string, state job.JobState) error

func (*RegistryMux) Unit

func (r *RegistryMux) Unit(name string) (*job.Unit, error)

func (*RegistryMux) UnitHeartbeat

func (r *RegistryMux) UnitHeartbeat(name string, machID string, ttl time.Duration) error

func (*RegistryMux) UnitState

func (r *RegistryMux) UnitState(name string) (*unit.UnitState, error)

func (*RegistryMux) UnitStates

func (r *RegistryMux) UnitStates() ([]*unit.UnitState, error)

func (*RegistryMux) Units

func (r *RegistryMux) Units() ([]job.Unit, error)

func (*RegistryMux) UnscheduleUnit

func (r *RegistryMux) UnscheduleUnit(name string, machID string) error

func (*RegistryMux) UpdateEngineVersion

func (r *RegistryMux) UpdateEngineVersion(from int, to int) error

func (*RegistryMux) UseEtcdRegistry

func (r *RegistryMux) UseEtcdRegistry() bool

Jump to

Keyboard shortcuts

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