Documentation ¶
Index ¶
Constants ¶
View Source
const (
// CIVersion specifies the version tag used for ci builds
CIVersion = "ci"
)
Variables ¶
This section is empty.
Functions ¶
func CreateClusterJWT ¶
CreateClusterJWT generates jwt used in cluster registration
func SendRequestToSubscriber ¶
func SendRequestToSubscriber(subscriberRequest SubscriberRequests, r store.StateData)
SendRequestToSubscriber sends events from the graphQL server to the subscribers listening for the requests
func ValidateClusterJWT ¶
ValidateClusterJWT validates the cluster jwt
Types ¶
type Service ¶
type Service interface { RegisterCluster(request model.RegisterClusterRequest) (*model.RegisterClusterResponse, error) UpdateCluster(query bson.D, update bson.D) error ConfirmClusterRegistration(request model.ClusterIdentity, r store.StateData) (*model.ConfirmClusterRegistrationResponse, error) NewClusterEvent(request model.NewClusterEventRequest, r store.StateData) (string, error) DeleteClusters(ctx context.Context, projectID string, clusterIds []*string, r store.StateData) (string, error) ListClusters(projectID string, clusterType *string) ([]*model.Cluster, error) GetAgentDetails(ctx context.Context, clusterID string, projectID string) (*model.Cluster, error) GetManifestWithClusterID(clusterID string, accessKey string) ([]byte, error) SendClusterEvent(eventType, eventName, description string, cluster model.Cluster, r store.StateData) VerifyCluster(identity model.ClusterIdentity) (*dbSchemaCluster.Cluster, error) GetManifest(token string) ([]byte, int, error) GetCluster(clusterID string) (dbSchemaCluster.Cluster, error) GetEndpoint(agentType utils.AgentType) (string, error) GetClusterResource(manifest string, namespace string) (*unstructured.Unstructured, error) }
func NewService ¶
func NewService(clusterOperator *dbSchemaCluster.Operator, chaosWorkflowOperator *dbOperationsWorkflow.Operator, kubeClients *k8s.KubeClients) Service
NewService returns a new instance of Service
type SubscriberRequests ¶
type SubscriberRequests struct { RequestType string `json:"request_type"` K8sManifest string `json:"k8s_manifest"` ExternalData *string `json:"external_data"` ProjectID string `json:"project_id"` ClusterID string `json:"cluster_id"` Namespace string `json:"namespace"` Username *string `json:"username"` }
SubscriberRequests contains the required configurable parameters for the requests sent to the subscriber
Click to show internal directories.
Click to hide internal directories.