Documentation ¶
Index ¶
- Constants
- Variables
- type Cluster
- type ClusterComponent
- type ClusterHost
- type ClusterLog
- type Component
- type EngineConfig
- type Host
- type MetaComponent
- type Notification
- type SQLEngine
- func (e *SQLEngine) CreateCluster(c *Cluster) error
- func (e *SQLEngine) CreateComponent(clusterID string, cp *Component) error
- func (e *SQLEngine) CreateHost(clusterID string, h *Host) error
- func (e *SQLEngine) CreateLog(clusterID string, n *Notification) error
- func (e *SQLEngine) DeleteCluster(id string) error
- func (e *SQLEngine) DeleteComponent(clusterID string, id string) error
- func (e *SQLEngine) DeleteHost(clusterID string, hostID string) error
- func (e *SQLEngine) DeleteLogs(clusterID string) error
- func (e *SQLEngine) RetrieveCluster(id string) (c *Cluster, err error)
- func (e *SQLEngine) RetrieveClusters() ([]*Cluster, error)
- func (e *SQLEngine) RetrieveComponent(clusterID string, id string) (*Component, error)
- func (e *SQLEngine) RetrieveComponents(clusterID string) (cs []*Component, err error)
- func (e *SQLEngine) RetrieveHost(clusterID string, hostID string) (*Host, error)
- func (e *SQLEngine) RetrieveHosts(clusterID string) (hs []*Host, err error)
- func (e *SQLEngine) RetrieveLogs(clusterID string) ([]*Notification, error)
- func (e *SQLEngine) UpdateCluster(c *Cluster) error
- func (e *SQLEngine) UpdateComponent(clusterID string, cp *Component) error
- func (e *SQLEngine) UpdateHost(clusterID string, h *Host) error
Constants ¶
View Source
const ( Initial = "initial" Processing = "processing" Success = "success" Failed = "failed" )
Variables ¶
View Source
var ( //DBPath - sqlite db file path DBPath *string //InitSQL - sql file to init db InitSQL *string )
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { ID string `xorm:"varchar(255) notnull pk 'id'" json:"id"` Name string `xorm:"varchar(255) notnull unique 'name'" json:"name"` Description string `xorm:"varchar(255) 'description'" json:"description"` State string `xorm:"varchar(255) 'state'" json:"state"` Hosts []*Host `xorm:"-" json:"hosts,omitempty"` Components []*Component `xorm:"-" json:"components,omitempty"` }
type ClusterComponent ¶
type ClusterHost ¶
type ClusterHost struct { ClusterID string `xorm:"varchar(255) notnull pk 'cluster_id'"` HostID string `xorm:"varchar(255) notnull pk 'host_id'"` IP string `xorm:"varchar(25) notnull unique 'ip'"` Hostname string `xorm:"varchar(255) notnull unique 'hostname'"` Host *Host `xorm:"json notnull 'host'"` }
type ClusterLog ¶
type ClusterLog struct { ClusterID string `xorm:"varchar(255) notnull 'cluster_id'"` Created time.Time `xorm:"created"` Log *Notification `xorm:"json notnull 'log'"` }
type Component ¶
type Component struct { MetaComponent Hosts map[string][]string `json:"hosts"` }
type EngineConfig ¶
type MetaComponent ¶
type Notification ¶
type SQLEngine ¶
type SQLEngine struct {
// contains filtered or unexported fields
}
func (*SQLEngine) CreateCluster ¶
func (*SQLEngine) CreateComponent ¶
func (*SQLEngine) CreateLog ¶
func (e *SQLEngine) CreateLog(clusterID string, n *Notification) error
func (*SQLEngine) DeleteCluster ¶
func (*SQLEngine) DeleteComponent ¶
func (*SQLEngine) DeleteHost ¶
func (*SQLEngine) DeleteLogs ¶
func (*SQLEngine) RetrieveCluster ¶
func (*SQLEngine) RetrieveClusters ¶
func (*SQLEngine) RetrieveComponent ¶
func (*SQLEngine) RetrieveComponents ¶
func (*SQLEngine) RetrieveHost ¶
func (*SQLEngine) RetrieveHosts ¶
func (*SQLEngine) RetrieveLogs ¶
func (e *SQLEngine) RetrieveLogs(clusterID string) ([]*Notification, error)
func (*SQLEngine) UpdateCluster ¶
func (*SQLEngine) UpdateComponent ¶
Click to show internal directories.
Click to hide internal directories.