Documentation ¶
Index ¶
- type Cluster
- func (clusterController *Cluster) CreateNew(newCluster models.CreateClusterRequest) (models.Cluster, error)
- func (clusterController Cluster) DoesClusterExist(name string) (id int, ok bool)
- func (clusterController *Cluster) FindOrCreate(name string) (int, error)
- func (clusterController *Cluster) GetByID(id int) (models.Cluster, error)
- func (clusterController *Cluster) GetByName(name string) (models.Cluster, error)
- func (clusterController *Cluster) ListAll() ([]models.Cluster, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster is the management layer for clusters
func NewClusterController ¶
NewController accepts a gorm DB connection and returns a new instance of the cluster controller
func (*Cluster) CreateNew ¶
func (clusterController *Cluster) CreateNew(newCluster models.CreateClusterRequest) (models.Cluster, error)
CreateNew is the public api on the clusterController for persisting a new service entity to the data store
func (Cluster) DoesClusterExist ¶
DoesClusterExist is a helper method to check if a cluster with the given name already exists in sherlock's data storage
func (*Cluster) FindOrCreate ¶
FindOrCreate will attempt to look an cluster by name and return its ID if successful if unsuccessful it will create a new cluster from the provider name and return that id
func (*Cluster) GetByID ¶
GetByID is the public API for looking up a cluster from the data store by name
Click to show internal directories.
Click to hide internal directories.