Documentation
¶
Index ¶
- Constants
- Variables
- func NodeName() string
- type Dependency
- type Deployment
- type Node
- type NodeFeatures
- type Project
- func (p *Project) AddNode() (*Project, *Node, error)
- func (p *Project) FindMasterNode() *Node
- func (p *Project) FindNodeByID(id string) *Node
- func (p *Project) FindNodeByIPV4(ip net.IP) *Node
- func (p *Project) FindNodeByName(name string) *Node
- func (p *Project) HasTag(tag string) bool
- func (p *Project) RemoveKey(key *SSHKey) *Project
- func (p *Project) RemoveNode(node *Node) *Project
- func (p *Project) Reserve() *Project
- func (p *Project) Tag(tags ...string) *Project
- func (p *Project) ToJSON() ([]byte, error)
- func (p *Project) UpdateKey(key *SSHKey) *Project
- func (p *Project) UpdateNode(node *Node) *Project
- func (p *Project) WithDeployments(deployments ...Deployment) *Project
- func (p *Project) WithName(name string) *Project
- func (p *Project) WithProvider(provider string) *Project
- func (p *Project) WithProviderID(providerProjectId string) *Project
- func (p *Project) WithProviderToken(token string) *Project
- func (p *Project) WriteJSON(w io.Writer) error
- type ProjectOption
- func WithDeployments(deployments ...Deployment) ProjectOption
- func WithDomain(domain string) ProjectOption
- func WithID(id string) ProjectOption
- func WithName(name string) ProjectOption
- func WithProvider(provider string) ProjectOption
- func WithProviderID(projectProviderId string) ProjectOption
- func WithProviderToken(token string) ProjectOption
- type Projects
- 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 = "RETRYING" 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"
View Source
const ErrorNoReservableProjects = "Could not find any available projects to reserve"
View Source
const ReserveGraceTime = time.Hour * 4
Variables ¶
View Source
var ( KeyStatusNew = "NEW" KeyStatusAdapting = "ADAPTING" KeyStatusActive = "ACTIVE" KeyStatusFailing = "FAILING" KeyStatusDeleted = "DELETED" )
Functions ¶
Types ¶
type Dependency ¶
type Deployment ¶
type Node ¶
type Node struct { ID string `json:"id"` 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 NodeFeatures `json:"features"` Dependencies []Dependency `json:"dependencies"` InstallPassword string `json:"installPassword"` InstallUser string `json:"installUser"` Delete *time.Time `json:"delete"` }
func (*Node) NeedsAdapting ¶
type NodeFeatures ¶ added in v0.0.7
type Project ¶
type Project struct { ID string `json:"id"` Provider string `json:"provider"` ProviderID string `json:"providerID"` // Provider Project ID ProviderToken string `json:"providerToken"` Name string `json:"name"` SSHKey *SSHKey `json:"sshKey"` Nodes []Node `json:"nodes"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Context string `json:"context"` Deployments []Deployment `json:"deployments"` Reserved bool `json:"reserved"` Delete *time.Time `json:"delete"` Domain string `json:"domain"` Tags []string `json:"tags"` }
func NewProject ¶
func NewProject(opts ...ProjectOption) (*Project, error)
func ParseConfig ¶
func (*Project) FindMasterNode ¶ added in v0.0.9
func (*Project) FindNodeByID ¶
func (*Project) FindNodeByName ¶
func (*Project) RemoveNode ¶
func (*Project) UpdateNode ¶
func (*Project) WithDeployments ¶ added in v0.0.11
func (p *Project) WithDeployments(deployments ...Deployment) *Project
func (*Project) WithProvider ¶
func (*Project) WithProviderID ¶ added in v0.0.5
func (*Project) WithProviderToken ¶ added in v0.0.5
type ProjectOption ¶
func WithDeployments ¶ added in v0.0.11
func WithDeployments(deployments ...Deployment) ProjectOption
func WithDomain ¶ added in v0.0.3
func WithDomain(domain string) ProjectOption
func WithID ¶
func WithID(id string) ProjectOption
func WithName ¶
func WithName(name string) ProjectOption
func WithProvider ¶ added in v0.0.5
func WithProvider(provider string) ProjectOption
func WithProviderID ¶ added in v0.0.5
func WithProviderID(projectProviderId 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 GenerateKeyPair ¶ added in v0.0.19
GenerateKeyPair creates a SSH key pair (Ed25519).
func (*SSHKey) NeedsAdapting ¶
Click to show internal directories.
Click to hide internal directories.