Documentation ¶
Index ¶
- Constants
- func GetAuthCreds(ctx context.Context, c client.Client, auth Auth) (internalhttp.BasicAuth, error)
- func GetRouterSvcUrl(namespace, druidClusterName string, c client.Client) (string, error)
- func MakePath(baseURL, componentType, apiType string, additionalPaths ...string) string
- type Auth
- type AuthType
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 ¶
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 ¶
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"` }
Click to show internal directories.
Click to hide internal directories.