druidapi

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DruidRouterPort  = "8088"
	OperatorUserName = "OperatorUserName"
	OperatorPassword = "OperatorPassword"
)

Variables

This section is empty.

Functions

func GetAuthCreds

func GetAuthCreds(
	ctx context.Context,
	c client.Client,
	auth Auth,
) (internalhttp.BasicAuth, error)

GetAuthCreds retrieves basic authentication credentials from a Kubernetes secret. If the Auth object is empty, it returns an empty BasicAuth object. Parameters:

ctx: The context object.
c: The Kubernetes client.
auth: The Auth object containing the secret reference.

Returns:

BasicAuth: The basic authentication credentials.

func GetRouterSvcUrl

func GetRouterSvcUrl(namespace, druidClusterName string, c client.Client) (string, error)

GetRouterSvcUrl retrieves the URL of the Druid router service. Parameters:

namespace: The namespace of the Druid cluster.
druidClusterName: The name of the Druid cluster.
c: The Kubernetes client.

Returns:

string: The URL of the Druid router service.

func MakePath

func MakePath(baseURL, componentType, apiType string, additionalPaths ...string) string

MakePath constructs the appropriate path for the specified Druid API. Parameters:

baseURL: The base URL of the Druid cluster. For example, http://router-svc.namespace.svc.cluster.local:8088.
componentType: The type of Druid component. For example, "indexer".
apiType: The type of Druid API. For example, "worker".
additionalPaths: Additional path components to be appended to the URL.

Returns:

string: The constructed path.

Types

type Auth

type Auth struct {
	// +required
	Type AuthType `json:"type"`
	// +required
	SecretRef v1.SecretReference `json:"secretRef"`
}

type AuthType

type AuthType string
const (
	BasicAuth AuthType = "basic-auth"
)

Jump to

Keyboard shortcuts

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