Documentation ¶
Index ¶
- Constants
- Variables
- type Dependency
- type Deployment
- type LubeNodeFeatures
- type Node
- type Project
- func (lc *Project) FindClusterMasterNode(clusterName string) *Node
- func (lc *Project) FindNodeByID(id string) *Node
- func (lc *Project) FindNodeByIPV4(ip net.IP) *Node
- func (lc *Project) FindNodeByName(name string) *Node
- func (lc *Project) RemoveKey(key *SSHKey) *Project
- func (lc *Project) RemoveNode(node *Node) *Project
- func (p *Project) Reserve() *Project
- func (p *Project) Tag(tags ...string) *Project
- func (lc *Project) ToJSON() ([]byte, error)
- func (lc *Project) UpdateKey(key *SSHKey) *Project
- func (lc *Project) UpdateNode(node *Node) *Project
- func (cfg *Project) WithAPIToken(apiToken string) *Project
- func (cfg *Project) WithProvider(provider string) *Project
- func (lc *Project) WriteJSON(w io.Writer) error
- type ProjectOption
- type SSHKey
Constants ¶
View Source
const ( DependencyStatusNew = "NEW" DependencyStatusDeploying = "DEPLOYING" DependencyStatusFailing = "FAILING" DependencyStatusRetrying = "RETRYING" DependencyStatusReady = "READY" DependencyStatusWaiting = "WAITING" )
View Source
const ( DeploymentStatusNew = "NEW" DeploymentStatusDeploying = "DEPLOYING" DeploymentStatusFailing = "FAILING" DeploymentStatusRetrying = "READY" DeploymentStatusReady = "READY" )
View Source
const ( NodeStatusNew = "NEW" NodeStatusDeploying = "DEPLOYING" NodeStatusActive = "ACTIVE" NodeStatusReady = "READY" NodeStatusFailing = "FAILING" NodeStatusRetrying = "RETRYING" NodeStatusRestarting = "RESTARTING" NodeStatusStopped = "STOPPED" NodeStatusError = "ERROR" NodeStatusDeleted = "DELETED" )
View Source
const DefaultProvider = "GLESYS"
Variables ¶
View Source
var ( KeyStatusNew = "NEW" KeyStatusAdapting = "ADAPTING" KeyStatusActive = "ACTIVE" KeyStatusFailing = "FAILING" KeyStatusDeleted = "DELETED" )
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Deployment ¶
type LubeNodeFeatures ¶
type Node ¶
type Node struct { ID string `json:"id"` ClusterName string `json:"clusterName"` ProviderID string `json:"providerId"` NodeToken string `json:"nodeToken"` IsMaster bool `json:"isMaster"` MasterIP net.IP `json:"masterIP"` Tags []string `json:"tags"` Name string `json:"name"` IPV4 net.IP `json:"ipv4"` IPV6 net.IP `json:"ipv6"` Status string `json:"status"` Retries int `json:"retries"` Error string `json:"error"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Deleted *time.Time `json:"deleted"` Features LubeNodeFeatures `json:"features"` Dependencies []Dependency `json:"dependencies"` Deployments []Deployment `json:"deployments"` InstallPassword string `json:"installPassword"` InstallUser string `json:"installUser"` }
func (*Node) NeedsAdapting ¶
type Project ¶
type Project struct { ProjectID string `json:"project"` APIToken string `json:"apiToken"` SSHKey *SSHKey `json:"sshKey"` Nodes []Node `json:"nodes"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Context string `json:"context"` Provider string `json:"provider"` Reserved bool `json:"reserved"` Tags []string `json:"tags"` }
func NewProject ¶
func NewProject(opts ...ProjectOption) (*Project, error)
func ParseConfig ¶
func (*Project) FindClusterMasterNode ¶
func (*Project) FindNodeByID ¶
func (*Project) FindNodeByName ¶
func (*Project) RemoveNode ¶
func (*Project) UpdateNode ¶
func (*Project) WithAPIToken ¶
func (*Project) WithProvider ¶
type ProjectOption ¶
func WithID ¶
func WithID(projectId string) ProjectOption
func WithName ¶
func WithName(projectId string) ProjectOption
func WithProviderToken ¶
func WithProviderToken(token string) ProjectOption
type SSHKey ¶
type SSHKey struct { ID string `json:"id""` ProviderID string `json:"providerId"` Name string `json:"name"` Status string `json:"status"` Fingerprint string `json:"fingerprint"` Error string `json:"error"` PrivateKey string `json:"privateKey"` PublicKey string `json:"publicKey"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
func GetPublicKeys ¶
func GetPublicKeys() (*SSHKey, *rsa.PrivateKey, error)
func (*SSHKey) NeedsAdapting ¶
Click to show internal directories.
Click to hide internal directories.