cloud

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cloud provides the methods to connect and talk to the Redpanda Cloud public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpawnConn

func SpawnConn(ctx context.Context, url string, authToken string) (*grpc.ClientConn, error)

SpawnConn returns a grpc connection to the given URL, it adds a bearer token to each request with the given 'authToken'.

Types

type Endpoint

type Endpoint struct {
	APIURL string // CloudV2 public API URL.
	// contains filtered or unexported fields
}

Endpoint is a representation of a cloud endpoint for a single environment. It contains the URLs, audience for authentication and the API URL.

func RequestTokenAndEnv

func RequestTokenAndEnv(ctx context.Context, cloudEnv, clientID, clientSecret string) (string, *Endpoint, error)

RequestTokenAndEnv requests an authentication token and return the Endpoint for a given environment.

Jump to

Keyboard shortcuts

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