Documentation ¶
Index ¶
- type API
- func (a *API) DeleteLeaderElection(c *gin.Context)
- func (a *API) GetLeaderElection(c *gin.Context)
- func (a *API) GetReady(c *gin.Context)
- func (a *API) ListCommands(c *gin.Context)
- func (a *API) PostLeaderElection(c *gin.Context)
- func (a *API) PostReady(c *gin.Context)
- func (a *API) RegisterRoutes(r gin.IRouter)
- type LeaderInfo
- type LeaderRepository
- type ReadyRequest
- type TokenGenerator
- type VaultLeaderRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI( clusterGetter common.ClusterGetter, errorHandler emperror.Handler, tokenGenerator TokenGenerator, externalBaseURL string, workflowClient client.Client, leaderRepository LeaderRepository, ) *API
func (*API) DeleteLeaderElection ¶
DeleteLeaderElection -
func (*API) GetReady ¶
GetReady responds to requests with information about the specified cluster's readiness
func (*API) ListCommands ¶
ListCommands Lists the commands for installing nodes in each nodePool
func (*API) PostLeaderElection ¶
PostLeaderElection handles leader applications
func (*API) RegisterRoutes ¶
type LeaderInfo ¶
type LeaderRepository ¶
type LeaderRepository interface { GetLeader(organizationID, clusterID uint) (LeaderInfo, error) SetLeader(organizationID, clusterID uint, leaderInfo LeaderInfo) error DeleteLeader(organizationID, clusterID uint) error }
type ReadyRequest ¶
type ReadyRequest struct { Config string `json:"config,omitempty"` // kubeconfig in base64 or empty if not a master Name string `json:"name,required"` // name of node NodePool string `json:"nodePool"` // name of nodepool the new node belongs to IP string `json:"ip,omitempty"` // ip address of node (where the other nodes can reach it) Master bool Worker bool }
type TokenGenerator ¶
type VaultLeaderRepository ¶
type VaultLeaderRepository struct {
// contains filtered or unexported fields
}
VaultLeaderRepository implements a LeaderRepository over Vault secret store
func NewVaultLeaderRepository ¶
func NewVaultLeaderRepository() (VaultLeaderRepository, error)
NewVaultLeaderRepository returns a new VaultLeaderRepository
func NewVaultLeaderRepositoryFromClient ¶
func NewVaultLeaderRepositoryFromClient(client *vault.Client) VaultLeaderRepository
NewVaultLeaderRepositoryFromClient returns a new VaultLeaderRepository
func (VaultLeaderRepository) DeleteLeader ¶
func (r VaultLeaderRepository) DeleteLeader(organizationID, clusterID uint) error
func (VaultLeaderRepository) GetLeader ¶
func (r VaultLeaderRepository) GetLeader(organizationID, clusterID uint) (leaderInfo LeaderInfo, err error)
GetLeader returns information about the leader of the specified cluster
func (VaultLeaderRepository) SetLeader ¶
func (r VaultLeaderRepository) SetLeader(organizationID, clusterID uint, leaderInfo LeaderInfo) error
SetLeader writes the given leader info for the specified cluster to the repository if it's not set yet
Source Files ¶
Click to show internal directories.
Click to hide internal directories.