Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Store Store
Supervisor Supervisor
Provisioner Provisioner
RequestID string
Logger logrus.FieldLogger
}
Context provides the API with all necessary data and interfaces for responding to requests.
It is cloned before each request, allowing per-request changes such as logger annotations.
type Provisioner ¶ added in v0.2.0
type Provisioner interface {
ExecMattermostCLI(cluster *model.Cluster, clusterInstallation *model.ClusterInstallation, args ...string) ([]byte, error)
GetClusterResources(*model.Cluster, bool) (*k8s.ClusterResources, error)
}
Provisioner describes the interface required to communicate with the Kubernetes cluster.
type Store ¶
type Store interface {
CreateCluster(cluster *model.Cluster) error
GetCluster(clusterID string) (*model.Cluster, error)
GetClusters(filter *model.ClusterFilter) ([]*model.Cluster, error)
UpdateCluster(cluster *model.Cluster) error
LockCluster(clusterID, lockerID string) (bool, error)
UnlockCluster(clusterID, lockerID string, force bool) (bool, error)
DeleteCluster(clusterID string) error
CreateInstallation(installation *model.Installation) error
GetInstallation(installationID string, includeGroupConfig, includeGroupConfigOverrides bool) (*model.Installation, error)
GetInstallations(filter *model.InstallationFilter) ([]*model.Installation, error)
UpdateInstallation(installation *model.Installation) error
LockInstallation(installationID, lockerID string) (bool, error)
UnlockInstallation(installationID, lockerID string, force bool) (bool, error)
DeleteInstallation(installationID string) error
GetClusterInstallation(clusterInstallationID string) (*model.ClusterInstallation, error)
GetClusterInstallations(filter *model.ClusterInstallationFilter) ([]*model.ClusterInstallation, error)
CreateGroup(group *model.Group) error
GetGroup(groupID string) (*model.Group, error)
GetGroups(filter *model.GroupFilter) ([]*model.Group, error)
UpdateGroup(group *model.Group) error
DeleteGroup(groupID string) error
CreateWebhook(webhook *model.Webhook) error
GetWebhook(webhookID string) (*model.Webhook, error)
GetWebhooks(filter *model.WebhookFilter) ([]*model.Webhook, error)
DeleteWebhook(webhookID string) error
}
Store describes the interface required to persist changes made via API requests.
type Supervisor ¶
type Supervisor interface {
Do() error
}
Supervisor describes the interface to notify the background jobs of an actionable change.
Click to show internal directories.
Click to hide internal directories.