server

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Region

type Region string

Region represents a Konnect region.

const (
	// RegionGlobal represents the global region.
	RegionGlobal Region = "global"
)

These are the well-known Konnect regions. The list is not exhaustive.

func NewRegion

func NewRegion(region string) (Region, error)

NewRegion returns a new Region from a string, or an error if the string is not a valid region.

func (Region) String

func (r Region) String() string

type Server

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

Server is a type to represent a server.

func NewServer

func NewServer[T any](serverURL string) (Server, error)

NewServer creates a new Server from a string. It accepts either a full URL or a hostnameWithoutRegion.

func (Server) Region

func (s Server) Region() Region

Region returns the region of the Server.

func (Server) URL

func (s Server) URL() string

URL returns the full URL representation of the Server.

Jump to

Keyboard shortcuts

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