streamnativecloud

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 13 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       = "resource.streamnative.io/workspace-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 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

Jump to

Keyboard shortcuts

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