Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//MAPPING is the elastic mapping for a service template
MAPPING, _ = elastic.NewMapping(mappingString)
)
Functions ¶
Types ¶
type ServiceTemplate ¶
type ServiceTemplate struct { ID string // Unique ID of this service template Name string // Name of service template Version string // Version of the service Description string // Meaningful description of service Services []servicedefinition.ServiceDefinition // Child services ConfigFiles map[string]servicedefinition.ConfigFile // Config file templates datastore.VersionedEntity }
ServiceTemplate type to hold service definitions
func BuildFromPath ¶
func BuildFromPath(path string) (*ServiceTemplate, error)
BuildFromPath given a path will create a ServiceDefintion
func FromJSON ¶
func FromJSON(data string) (*ServiceTemplate, error)
FromJSON creates a ServiceTemplate from the json string
func (*ServiceTemplate) Equals ¶
func (a *ServiceTemplate) Equals(b *ServiceTemplate) bool
Equals checks the equality of two service templates
func (*ServiceTemplate) GetID ¶
func (st *ServiceTemplate) GetID() string
GetID return a ServiceTemplate instance's ID It returns the ID as a string
func (*ServiceTemplate) GetType ¶
func (st *ServiceTemplate) GetType() string
GetType returns the ServiceTemplate instance's type It returns the type as a string
func (*ServiceTemplate) Hash ¶
func (a *ServiceTemplate) Hash() (string, error)
func (*ServiceTemplate) ValidEntity ¶
func (st *ServiceTemplate) ValidEntity() error
ValidEntity ensure that a ServiceTemplate has valid values
type ServiceTemplateDeploymentRequest ¶
type ServiceTemplateDeploymentRequest struct { PoolID string // Pool Id to deploy service into TemplateID string // Id of template to be deployed DeploymentID string // Unique id of the instance of this template }
A request to deploy a service template
type Store ¶
type Store interface { // Get a ServiceTemplate by id. Return ErrNoSuchEntity if not found Get(ctx datastore.Context, id string) (*ServiceTemplate, error) // Put adds or updates a ServiceTemplate Put(ctx datastore.Context, st ServiceTemplate) error // Delete removes the a ServiceTemplate if it exists Delete(ctx datastore.Context, id string) error // GetServiceTemplates returns all ServiceTemplates GetServiceTemplates(ctx datastore.Context) ([]*ServiceTemplate, error) }
Store type for interacting with ResourcePool persistent storage
Source Files ¶
Click to show internal directories.
Click to hide internal directories.