Documentation ¶
Index ¶
- Constants
- func AttachNIC(ctx context.Context, instanceID string, nic NetworkInterface) error
- func DeleteInstance(ctx context.Context, request json.RawMessage) error
- func EventStream(events rhyzome_protos.RhyzomeLibvirt_EventStreamServer) error
- func InstanceStarted(ctx context.Context, req *rhyzome_protos.InstanceStartedRequest) (*rhyzome_protos.InstanceStartedResponse, error)
- func InstanceStopped(ctx context.Context, req *rhyzome_protos.InstanceStoppedRequest) (*rhyzome_protos.InstanceStoppedResponse, error)
- func SendEvent(node string, event *rhyzome_protos.LibvirtEvent) (*rhyzome_protos.LibvirtEventUpdate, error)
- func StartInstance(ctx context.Context, request json.RawMessage) error
- func StopInstance(ctx context.Context, request json.RawMessage) error
- type CreateRequest
- type DeleteRequest
- type NetworkInterface
- type StartStopRequest
Constants ¶
View Source
const ( // some jobs require special handling right before they are pushed to the worker. They have a custom type (listed here) which corresponds to a handler. // jobs with no type are exepcted to json decode as a rhyzome_protos.LibvirtEvent, which will be pushed to the worker. // note that some of these don't actually need special handling but haven't been refactored to use the common format CreateInstanceJobTypeV1 = "instance/create/v1" StartInstanceJobTypeV1 = "instance/start/v1" StopInstanceJobTypeV1 = "instance/stop/v1" DeleteInstanceJobTypeV1 = "instance/delete/v1" JobStatePENDING = 0 JobStateRUNNING = 1 JobStateDONE = 2 JobStateERROR = 3 )
Variables ¶
This section is empty.
Functions ¶
func DeleteInstance ¶
func DeleteInstance(ctx context.Context, request json.RawMessage) error
func EventStream ¶
func EventStream(events rhyzome_protos.RhyzomeLibvirt_EventStreamServer) error
func InstanceStarted ¶
func InstanceStarted(ctx context.Context, req *rhyzome_protos.InstanceStartedRequest) (*rhyzome_protos.InstanceStartedResponse, error)
InstanceStarted callback is called when a VM starts up
func InstanceStopped ¶
func InstanceStopped(ctx context.Context, req *rhyzome_protos.InstanceStoppedRequest) (*rhyzome_protos.InstanceStoppedResponse, error)
InstanceStopped call the on vm stop hook
func SendEvent ¶
func SendEvent(node string, event *rhyzome_protos.LibvirtEvent) (*rhyzome_protos.LibvirtEventUpdate, error)
func StartInstance ¶
func StartInstance(ctx context.Context, request json.RawMessage) error
StartInstance requests that libvirt boot a VM
func StopInstance ¶
func StopInstance(ctx context.Context, request json.RawMessage) error
StopInstance requests that libvirt boot a VM
Types ¶
type CreateRequest ¶
type DeleteRequest ¶
type DeleteRequest struct {
Id string
}
type NetworkInterface ¶
type StartStopRequest ¶
type StartStopRequest struct {
ResourceID string
}
Click to show internal directories.
Click to hide internal directories.