Documentation
¶
Index ¶
- func NewCloudID(cid string) cloudID
- func NewCloudKVs(val map[string]interface{}) cloudKVs
- type Action
- type ActionFactory
- type AgentEnv
- type AgentEnvFactory
- type AgentEnvImpl
- type AgentID
- type AgentOptions
- type BlobstoreOptions
- type BlobstoreSpec
- type CPI
- type CPIFactory
- type CPIV1
- type CPIV2Additions
- type CallContext
- type CloudPropsImpl
- type DiskCID
- type DiskCloudProps
- type DiskHint
- type DiskMeta
- type DisksSpec
- type DisksV1
- type DisksV2Additions
- type EnvSpec
- type Info
- type Network
- type NetworkCloudProps
- type NetworkImpl
- func (n NetworkImpl) CloudProps() NetworkCloudProps
- func (n NetworkImpl) DNS() []string
- func (n NetworkImpl) Default() []string
- func (n NetworkImpl) Gateway() string
- func (n NetworkImpl) IP() string
- func (n NetworkImpl) IPWithSubnetMask() string
- func (n NetworkImpl) IsDefaultFor(what string) bool
- func (n NetworkImpl) IsDynamic() bool
- func (n NetworkImpl) MarshalJSON() ([]byte, error)
- func (n NetworkImpl) Netmask() string
- func (n *NetworkImpl) SetDNS(nameservers []string)
- func (n *NetworkImpl) SetMAC(mac string)
- func (n *NetworkImpl) SetPreconfigured()
- func (n NetworkImpl) Type() string
- type NetworkOpts
- type NetworkSpec
- type Networks
- type NetworksSpec
- type PersistentSpec
- type SnapshotCID
- type SnapshotsV1
- type StemcellAPIVersion
- type StemcellCID
- type StemcellCloudProps
- type StemcellsV1
- type VMCID
- type VMCloudProps
- type VMCloudPropsImpl
- type VMEnv
- type VMMeta
- type VMResources
- type VMSpec
- type VMsV1
- type VMsV2Additions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCloudID ¶
func NewCloudID(cid string) cloudID
func NewCloudKVs ¶
func NewCloudKVs(val map[string]interface{}) cloudKVs
Types ¶
type ActionFactory ¶
type ActionFactory struct {
// contains filtered or unexported fields
}
func NewActionFactory ¶
func NewActionFactory(cpiFactory CPIFactory) ActionFactory
func (ActionFactory) Create ¶
func (f ActionFactory) Create(method string, apiVersion int, context CallContext) (interface{}, error)
type AgentEnvFactory ¶
type AgentEnvFactory struct{}
func NewAgentEnvFactory ¶
func NewAgentEnvFactory() AgentEnvFactory
func (AgentEnvFactory) ForVM ¶
func (f AgentEnvFactory) ForVM( agentID AgentID, cid VMCID, networks Networks, env VMEnv, agentOptions AgentOptions) AgentEnv
type AgentEnvImpl ¶
type AgentEnvImpl struct {
// contains filtered or unexported fields
}
func (AgentEnvImpl) AsBytes ¶
func (ae AgentEnvImpl) AsBytes() ([]byte, error)
func (*AgentEnvImpl) AttachEphemeralDisk ¶
func (ae *AgentEnvImpl) AttachEphemeralDisk(hint DiskHint)
func (*AgentEnvImpl) AttachPersistentDisk ¶
func (ae *AgentEnvImpl) AttachPersistentDisk(cid DiskCID, hint DiskHint)
todo better type for hint
func (*AgentEnvImpl) AttachSystemDisk ¶
func (ae *AgentEnvImpl) AttachSystemDisk(hint DiskHint)
func (*AgentEnvImpl) DetachPersistentDisk ¶
func (ae *AgentEnvImpl) DetachPersistentDisk(cid DiskCID)
type AgentID ¶
type AgentID struct {
// contains filtered or unexported fields
}
func NewAgentID ¶
func (AgentID) MarshalJSON ¶
func (*AgentID) UnmarshalJSON ¶
type AgentOptions ¶
type AgentOptions struct {
Mbus string // e.g. "https://user:password@127.0.0.1:4321/agent"
NTP []string // e.g. ["0.us.pool.ntp.org"]. Ok to be empty
Blobstore BlobstoreOptions
}
func (AgentOptions) Validate ¶
func (o AgentOptions) Validate() error
type BlobstoreOptions ¶
func (BlobstoreOptions) Validate ¶
func (o BlobstoreOptions) Validate() error
type BlobstoreSpec ¶
type CPIFactory ¶
type CPIFactory interface {
New(CallContext) (CPI, error)
}
type CPIV1 ¶ added in v0.1.0
type CPIV1 interface {
StemcellsV1
VMsV1
DisksV1
SnapshotsV1
}
type CPIV2Additions ¶ added in v0.1.0
type CPIV2Additions interface {
VMsV2Additions
DisksV2Additions
}
type CallContext ¶
type CallContext interface {
As(interface{}) error
}
type CloudPropsImpl ¶
type CloudPropsImpl struct {
json.RawMessage
}
func (CloudPropsImpl) As ¶
func (c CloudPropsImpl) As(val interface{}) error
func (CloudPropsImpl) MarshalJSON ¶
func (c CloudPropsImpl) MarshalJSON() ([]byte, error)
type DiskCID ¶
type DiskCID struct {
// contains filtered or unexported fields
}
func NewDiskCID ¶
func (DiskCID) MarshalJSON ¶
func (*DiskCID) UnmarshalJSON ¶
type DiskCloudProps ¶
type DiskCloudProps interface {
As(interface{}) error
// contains filtered or unexported methods
}
type DiskHint ¶ added in v0.1.0
type DiskHint struct {
// contains filtered or unexported fields
}
func NewDiskHintFromMap ¶ added in v0.1.0
func NewDiskHintFromString ¶ added in v0.1.0
func (DiskHint) MarshalJSON ¶ added in v0.1.0
func (*DiskHint) UnmarshalJSON ¶ added in v0.1.0
type DiskMeta ¶ added in v0.1.0
type DiskMeta struct {
// contains filtered or unexported fields
}
func NewDiskMeta ¶ added in v0.1.0
func (DiskMeta) MarshalJSON ¶ added in v0.1.0
func (*DiskMeta) UnmarshalJSON ¶ added in v0.1.0
type DisksSpec ¶
type DisksSpec struct {
System DiskHint `json:"system"`
Ephemeral DiskHint `json:"ephemeral"`
Persistent PersistentSpec `json:"persistent"`
}
type DisksV2Additions ¶ added in v0.1.0
type Network ¶
type Network interface {
Type() string
IP() string
Netmask() string
Gateway() string
DNS() []string
Default() []string
SetMAC(string)
SetDNS([]string)
SetPreconfigured()
CloudProps() NetworkCloudProps
// Misc
IsDynamic() bool
IsDefaultFor(string) bool
IPWithSubnetMask() string
// contains filtered or unexported methods
}
func NewNetwork ¶
func NewNetwork(opts NetworkOpts) Network
type NetworkCloudProps ¶
type NetworkCloudProps interface {
As(interface{}) error
}
type NetworkImpl ¶
type NetworkImpl struct {
// contains filtered or unexported fields
}
func (NetworkImpl) CloudProps ¶
func (n NetworkImpl) CloudProps() NetworkCloudProps
func (NetworkImpl) DNS ¶
func (n NetworkImpl) DNS() []string
func (NetworkImpl) Default ¶
func (n NetworkImpl) Default() []string
func (NetworkImpl) Gateway ¶
func (n NetworkImpl) Gateway() string
func (NetworkImpl) IP ¶
func (n NetworkImpl) IP() string
func (NetworkImpl) IPWithSubnetMask ¶
func (n NetworkImpl) IPWithSubnetMask() string
func (NetworkImpl) IsDefaultFor ¶
func (n NetworkImpl) IsDefaultFor(what string) bool
func (NetworkImpl) IsDynamic ¶
func (n NetworkImpl) IsDynamic() bool
func (NetworkImpl) MarshalJSON ¶ added in v0.1.0
func (n NetworkImpl) MarshalJSON() ([]byte, error)
func (NetworkImpl) Netmask ¶
func (n NetworkImpl) Netmask() string
func (*NetworkImpl) SetDNS ¶
func (n *NetworkImpl) SetDNS(nameservers []string)
func (*NetworkImpl) SetMAC ¶
func (n *NetworkImpl) SetMAC(mac string)
func (*NetworkImpl) SetPreconfigured ¶
func (n *NetworkImpl) SetPreconfigured()
func (NetworkImpl) Type ¶
func (n NetworkImpl) Type() string
type NetworkOpts ¶
type NetworkSpec ¶
type NetworksSpec ¶
type NetworksSpec map[string]NetworkSpec
type PersistentSpec ¶
type SnapshotCID ¶ added in v0.1.0
type SnapshotCID struct {
// contains filtered or unexported fields
}
func NewSnapshotCID ¶ added in v0.1.0
func NewSnapshotCID(cid string) SnapshotCID
func (SnapshotCID) MarshalJSON ¶ added in v0.1.0
func (*SnapshotCID) UnmarshalJSON ¶ added in v0.1.0
type SnapshotsV1 ¶ added in v0.1.0
type SnapshotsV1 interface {
SnapshotDisk(DiskCID, DiskMeta) (SnapshotCID, error)
DeleteSnapshot(SnapshotCID) error
}
type StemcellAPIVersion ¶ added in v0.1.0
type StemcellAPIVersion struct {
// contains filtered or unexported fields
}
func NewStemcellAPIVersion ¶ added in v0.1.0
func NewStemcellAPIVersion(ctx CallContext) StemcellAPIVersion
func (StemcellAPIVersion) Value ¶ added in v0.1.0
func (s StemcellAPIVersion) Value() (int, error)
type StemcellCID ¶
type StemcellCID struct {
// contains filtered or unexported fields
}
func NewStemcellCID ¶
func NewStemcellCID(cid string) StemcellCID
func (StemcellCID) MarshalJSON ¶
func (*StemcellCID) UnmarshalJSON ¶
type StemcellCloudProps ¶
type StemcellCloudProps interface {
As(interface{}) error
}
type StemcellsV1 ¶ added in v0.1.0
type StemcellsV1 interface {
CreateStemcell(string, StemcellCloudProps) (StemcellCID, error)
DeleteStemcell(StemcellCID) error
}
type VMCID ¶
type VMCID struct {
// contains filtered or unexported fields
}
func (VMCID) MarshalJSON ¶
func (*VMCID) UnmarshalJSON ¶
type VMCloudProps ¶
type VMCloudProps interface {
As(interface{}) error
// contains filtered or unexported methods
}
type VMCloudPropsImpl ¶ added in v0.1.0
type VMCloudPropsImpl struct {
// contains filtered or unexported fields
}
func NewVMCloudPropsFromMap ¶ added in v0.1.0
func NewVMCloudPropsFromMap(val map[string]interface{}) VMCloudPropsImpl
func (VMCloudPropsImpl) As ¶ added in v0.1.0
func (i VMCloudPropsImpl) As(val interface{}) error
func (VMCloudPropsImpl) MarshalJSON ¶ added in v0.1.0
func (i VMCloudPropsImpl) MarshalJSON() ([]byte, error)
type VMEnv ¶
type VMEnv struct {
// contains filtered or unexported fields
}
func (VMEnv) MarshalJSON ¶
func (*VMEnv) UnmarshalJSON ¶
type VMMeta ¶
type VMMeta struct {
// contains filtered or unexported fields
}
func (VMMeta) MarshalJSON ¶
func (*VMMeta) UnmarshalJSON ¶
type VMResources ¶ added in v0.1.0
type VMsV1 ¶ added in v0.1.0
type VMsV1 interface {
CreateVM(AgentID, StemcellCID, VMCloudProps, Networks, []DiskCID, VMEnv) (VMCID, error)
DeleteVM(VMCID) error
CalculateVMCloudProperties(VMResources) (VMCloudProps, error)
SetVMMetadata(VMCID, VMMeta) error
HasVM(VMCID) (bool, error)
RebootVM(VMCID) error
GetDisks(VMCID) ([]DiskCID, error)
}
type VMsV2Additions ¶ added in v0.1.0
type VMsV2Additions interface {
CreateVMV2(AgentID, StemcellCID, VMCloudProps, Networks, []DiskCID, VMEnv) (VMCID, Networks, error)
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.