Documentation ¶
Index ¶
- Variables
- func GetType() string
- func Key(id string) datastore.Key
- type ByIP
- type Permission
- type PoolHost
- type PoolIPs
- type ReadPool
- type ResourcePool
- func (a *ResourcePool) Equals(b *ResourcePool) bool
- func (p ResourcePool) GetConnectionTimeout() time.Duration
- func (a *ResourcePool) GetID() string
- func (a *ResourcePool) GetType() string
- func (a *ResourcePool) HasAdminAccess() bool
- func (a *ResourcePool) HasDfsAccess() bool
- func (p *ResourcePool) ValidEntity() error
- func (a *ResourcePool) VirtualIPsEqual(b *ResourcePool) bool
- type Store
- type VirtualIP
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//MAPPING is the elastic mapping for a resource pool
MAPPING, _ = elastic.NewMapping(mappingString)
)
Functions ¶
Types ¶
type PoolIPs ¶
type PoolIPs struct { PoolID string HostIPs []host.HostIPResource VirtualIPs []VirtualIP }
PoolIPs type for IP resources available in a ResourcePool
type ReadPool ¶
type ReadPool struct { ID string // Unique identifier for resource pool, eg "default" Description string // Description of the resource pool CoreCapacity int // Sum of all cores on all hosts in the pool MemoryCapacity uint64 // Sum of all RAM available (bytes) on all hosts in the pool MemoryCommitment uint64 // Sum of RAM committed (bytes) to services in the pool ConnectionTimeout int // Wait delay on service rescheduling when an outage is reported (milliseconds) CreatedAt time.Time // When the pool was created UpdatedAt time.Time // When the poool was last updated Permissions Permission // A bitset of pemissions for this pool's hosts }
ReadPool is the read model for resource pools which contains properties for viewing information about resource pools.
type ResourcePool ¶
type ResourcePool struct { ID string // Unique identifier for resource pool, eg "default" Realm string // The name of the realm where this pool resides Description string // Description of the resource pool VirtualIPs []VirtualIP // All virtual IPs associated with a pool CoreLimit int // Number of cores on the host available to serviced MemoryLimit uint64 // A quota on the amount (bytes) of RAM in the pool, 0 = unlimited CoreCapacity int // Number of cores available as a sum of all cores on all hosts in the pool MemoryCapacity uint64 // Amount (bytes) of RAM available as a sum of all memory on all hosts in the pool MemoryCommitment uint64 // Amount (bytes) of RAM committed to services ConnectionTimeout int // Wait delay on service rescheduling when an outage is reported (milliseconds) CreatedAt time.Time UpdatedAt time.Time MonitoringProfile domain.MonitorProfile Permissions Permission datastore.VersionedEntity }
ResourcePool A collection of computing resources with optional quotas.
func (*ResourcePool) Equals ¶
func (a *ResourcePool) Equals(b *ResourcePool) bool
Equal returns true if two resource pools are equal
func (ResourcePool) GetConnectionTimeout ¶
func (p ResourcePool) GetConnectionTimeout() time.Duration
func (*ResourcePool) GetID ¶
func (a *ResourcePool) GetID() string
GetID returns its ResourcePool's ID. It return the ID as a string
func (*ResourcePool) GetType ¶
func (a *ResourcePool) GetType() string
GetType return a ResourcePool's Entity type or kind. It returns the Kind as a string.
func (*ResourcePool) HasAdminAccess ¶
func (a *ResourcePool) HasAdminAccess() bool
func (*ResourcePool) HasDfsAccess ¶
func (a *ResourcePool) HasDfsAccess() bool
func (*ResourcePool) ValidEntity ¶
func (p *ResourcePool) ValidEntity() error
ValidEntity validates Host fields
func (*ResourcePool) VirtualIPsEqual ¶
func (a *ResourcePool) VirtualIPsEqual(b *ResourcePool) bool
type Store ¶
type Store interface { datastore.EntityStore // GetResourcePools Get a list of all the resource pools GetResourcePools(ctx datastore.Context) ([]ResourcePool, error) // GetResourcePoolsByRealm gets a list of resource pools for a given realm GetResourcePoolsByRealm(ctx datastore.Context, realm string) ([]ResourcePool, error) // HasVirtualIP returns true if there is a virtual ip found for the given pool HasVirtualIP(ctx datastore.Context, poolID, virtualIP string) (bool, error) }
Store type for interacting with ResourcePool persistent storage
Click to show internal directories.
Click to hide internal directories.