streamnativecloud

package
v0.9.1-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package streamnativecloud implements the function of SN Cloud resource reconcile

Index

Constants

View Source
const (
	// Finalizers for resources
	FlinkDeploymentFinalizer = "resource.streamnative.io/flinkdeployment-finalizer"
	// WorkspaceFinalizer is the finalizer added to Workspace resources
	WorkspaceFinalizer = "resource.streamnative.io/workspace-finalizer"
	// SecretFinalizer is the finalizer added to Secret resources
	SecretFinalizer = "resource.streamnative.io/secret-finalizer"
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString checks if a string is present in a slice

func FlinkDeploymentStatusHasChanged

func FlinkDeploymentStatusHasChanged(oldStatus, newStatus *resourcev1alpha1.ComputeFlinkDeploymentStatus) bool

FlinkDeploymentStatusHasChanged compares two FlinkDeployment statuses to determine if there's a meaningful change

func RemoveString

func RemoveString(slice []string, s string) []string

RemoveString removes a string from a slice

func StatusHasChanged

func StatusHasChanged(oldConditions, newConditions []metav1.Condition) bool

StatusHasChanged compares two slices of conditions to determine if there's a meaningful change

Types

type APIConnection

type APIConnection struct {
	// contains filtered or unexported fields
}

APIConnection represents a connection to the API server

func NewAPIConnection

NewAPIConnection creates a new API connection

func (*APIConnection) Close

func (c *APIConnection) Close() error

Close closes the connection and cleans up any resources

func (*APIConnection) IsInitialized

func (c *APIConnection) IsInitialized() bool

IsInitialized returns whether the connection has been fully initialized

func (*APIConnection) NeedsUpdate

NeedsUpdate checks if the connection needs to be updated

func (*APIConnection) Test

func (c *APIConnection) Test(ctx context.Context) error

Test tests the connection

func (*APIConnection) Update

Update updates the connection configuration

type FlinkDeploymentClient

type FlinkDeploymentClient struct {
	// contains filtered or unexported fields
}

FlinkDeploymentClient handles FlinkDeployment operations with the API server

func NewFlinkDeploymentClient

func NewFlinkDeploymentClient(apiConn *APIConnection, organization string) (*FlinkDeploymentClient, error)

NewFlinkDeploymentClient creates a new FlinkDeployment client

func (*FlinkDeploymentClient) CreateFlinkDeployment

CreateFlinkDeployment creates a new FlinkDeployment

func (*FlinkDeploymentClient) DeleteFlinkDeployment

func (c *FlinkDeploymentClient) DeleteFlinkDeployment(ctx context.Context, deployment *resourcev1alpha1.ComputeFlinkDeployment) error

DeleteFlinkDeployment deletes a FlinkDeployment by name

func (*FlinkDeploymentClient) GetFlinkDeployment

func (c *FlinkDeploymentClient) GetFlinkDeployment(ctx context.Context, name string) (*computeapi.FlinkDeployment, error)

GetFlinkDeployment gets a FlinkDeployment by name

func (*FlinkDeploymentClient) UpdateFlinkDeployment

UpdateFlinkDeployment updates an existing FlinkDeployment

func (*FlinkDeploymentClient) WatchFlinkDeployment

func (c *FlinkDeploymentClient) WatchFlinkDeployment(ctx context.Context, name string) (watch.Interface, error)

WatchFlinkDeployment watches a FlinkDeployment by name

type SecretClient added in v0.9.0

type SecretClient struct {
	// contains filtered or unexported fields
}

SecretClient handles Secret operations with the API server

func NewSecretClient added in v0.9.0

func NewSecretClient(apiConn *APIConnection, organization string) (*SecretClient, error)

NewSecretClient creates a new Secret client

func (*SecretClient) CreateSecret added in v0.9.0

func (c *SecretClient) CreateSecret(ctx context.Context, secret *resourcev1alpha1.Secret) (*cloudapi.Secret, error)

CreateSecret creates a new Secret

func (*SecretClient) DeleteSecret added in v0.9.0

func (c *SecretClient) DeleteSecret(ctx context.Context, secret *resourcev1alpha1.Secret) error

DeleteSecret deletes a Secret by name

func (*SecretClient) GetSecret added in v0.9.0

func (c *SecretClient) GetSecret(ctx context.Context, name string) (*cloudapi.Secret, error)

GetSecret gets a Secret by name

func (*SecretClient) UpdateSecret added in v0.9.0

func (c *SecretClient) UpdateSecret(ctx context.Context, secret *resourcev1alpha1.Secret) (*cloudapi.Secret, error)

UpdateSecret updates an existing Secret

func (*SecretClient) WatchSecret added in v0.9.0

func (c *SecretClient) WatchSecret(ctx context.Context, name string) (watch.Interface, error)

WatchSecret watches a Secret by name

type WellKnownConfig

type WellKnownConfig struct {
	TokenEndpoint string `json:"token_endpoint"`
}

WellKnownConfig represents the OpenID Connect configuration

type WorkspaceClient

type WorkspaceClient struct {
	// contains filtered or unexported fields
}

WorkspaceClient handles workspace operations with the API server

func NewWorkspaceClient

func NewWorkspaceClient(apiConn *APIConnection, organization string) (*WorkspaceClient, error)

NewWorkspaceClient creates a new workspace client

func (*WorkspaceClient) CreateWorkspace

CreateWorkspace creates a new workspace

func (*WorkspaceClient) DeleteWorkspace

func (c *WorkspaceClient) DeleteWorkspace(ctx context.Context, workspace *resourcev1alpha1.ComputeWorkspace) error

DeleteWorkspace deletes a workspace

func (*WorkspaceClient) GetWorkspace

func (c *WorkspaceClient) GetWorkspace(ctx context.Context, id string) (*computeapi.Workspace, error)

GetWorkspace gets a workspace by ID

func (*WorkspaceClient) UpdateWorkspace

UpdateWorkspace updates a workspace

func (*WorkspaceClient) WatchWorkspace

func (c *WorkspaceClient) WatchWorkspace(ctx context.Context, name string) (watch.Interface, error)

WatchWorkspace watches a workspace by name

Directories

Path Synopsis
apis
cloud/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/cloud +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=cloud.streamnative.io
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/cloud +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=cloud.streamnative.io
compute/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/compute +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=compute.streamnative.io
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/compute +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=compute.streamnative.io
client
clientset_generated/clientset/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset_generated/clientset/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset_generated/clientset/typed/cloud/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset_generated/clientset/typed/cloud/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset_generated/clientset/typed/compute/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset_generated/clientset/typed/compute/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL