Documentation ¶
Overview ¶
Copyright © 2021 Antoine Martin <antoine@openance.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func AreWorkloadsReady(client *k8s.RESTClientGetter, callback WorkloadStateCallbackFunc) wait.ConditionFunc
- func HasApplications(client *k8s.RESTClientGetter) (has bool, err error)
- func OkString(b bool) string
- func StartCluster(distributionName string, logLevel string) (err error)
- func StatusViewerFor(kind schema.GroupKind) (polymorphichelpers.StatusViewer, error)
- func StopCluster(distributionName string) (err error)
- func WaitForCluster(distributionName string, timeout time.Duration) (err error)
- func WaitForWorkloads(client *k8s.RESTClientGetter, timeout time.Duration, ...) error
- type Application
- type ApplicationStatus
- type ApplicationStatusViewer
- type ClusterStatus
- type HealthStatus
- type SyncStatus
- type WorkloadState
- type WorkloadStateCallbackFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ApplicationSchemaGroupVersionKind = schema.GroupVersionKind{Group: "argoproj.io", Version: "v1alpha1", Kind: "Application"}
Functions ¶
func AreWorkloadsReady ¶ added in v0.3.8
func AreWorkloadsReady(client *k8s.RESTClientGetter, callback WorkloadStateCallbackFunc) wait.ConditionFunc
func HasApplications ¶ added in v0.3.8
func HasApplications(client *k8s.RESTClientGetter) (has bool, err error)
func StartCluster ¶
func StatusViewerFor ¶ added in v0.3.8
func StatusViewerFor(kind schema.GroupKind) (polymorphichelpers.StatusViewer, error)
func StopCluster ¶
func WaitForCluster ¶
func WaitForWorkloads ¶ added in v0.3.8
func WaitForWorkloads(client *k8s.RESTClientGetter, timeout time.Duration, callback WorkloadStateCallbackFunc) error
Types ¶
type Application ¶ added in v0.3.8
type Application struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` Status ApplicationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
type ApplicationStatus ¶ added in v0.3.8
type ApplicationStatus struct { Sync SyncStatus `json:"sync,omitempty" protobuf:"bytes,2,opt,name=sync"` Health HealthStatus `json:"health,omitempty" protobuf:"bytes,3,opt,name=health"` }
type ApplicationStatusViewer ¶ added in v0.3.8
type ApplicationStatusViewer struct{}
func (*ApplicationStatusViewer) Status ¶ added in v0.3.8
func (s *ApplicationStatusViewer) Status(obj runtime.Unstructured, revision int64) (string, bool, error)
type ClusterStatus ¶
type ClusterStatus int16
const ( Undefined ClusterStatus = iota Uninstalled Installed Started )
func GetClusterStatus ¶
func GetClusterStatus(distributionName string) (status ClusterStatus, err error)
func (ClusterStatus) String ¶
func (s ClusterStatus) String() (r string)
type HealthStatus ¶ added in v0.3.8
type HealthStatus struct { // Status holds the status code of the application or resource Status string `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` // Message is a human-readable informational message describing the health status Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` }
type SyncStatus ¶ added in v0.3.8
type SyncStatus struct {
Status string `json:"status" protobuf:"bytes,1,opt,name=status,casttype=SyncStatusCode"`
}
type WorkloadState ¶ added in v0.3.8
func AllWorkloadStates ¶ added in v0.3.8
func AllWorkloadStates(client *k8s.RESTClientGetter) (result []*WorkloadState, err error)
func (*WorkloadState) LongString ¶ added in v0.3.8
func (r *WorkloadState) LongString() string
func (*WorkloadState) String ¶ added in v0.3.8
func (r *WorkloadState) String() string
type WorkloadStateCallbackFunc ¶ added in v0.3.8
type WorkloadStateCallbackFunc func(state bool, total int, ready []*WorkloadState, unready []*WorkloadState)
Click to show internal directories.
Click to hide internal directories.