util

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 24 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrShuttingDown = errors.New("shutting down")
)

Functions

func GetEndpointQuantityOfResourceGroup

func GetEndpointQuantityOfResourceGroup(resources dtypes.ResourceGroup, kind rtypes.Endpoint_Kind) uint

func GetEndpointQuantityOfResourceUnits

func GetEndpointQuantityOfResourceUnits(r rtypes.Resources, kind rtypes.Endpoint_Kind) uint

func LeaseIDToNamespace

func LeaseIDToNamespace(lid mtypes.LeaseID) string

LeaseIDToNamespace generates a unique sha256 sum for identifying a provider's object name.

func MakeIPSharingKey

func MakeIPSharingKey(lID mtypes.LeaseID, endpointName string) string

Types

type ServiceClient

type ServiceClient interface {
	CreateRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)
	DoRequest(req *http.Request) (*http.Response, error)
}

type ServiceDiscoveryAgent

type ServiceDiscoveryAgent interface {
	Stop()
	GetClient(ctx context.Context, isHTTPS, secure bool) (ServiceClient, error)
	DiscoverNow()
}

func NewServiceDiscoveryAgent

func NewServiceDiscoveryAgent(ctx context.Context, logger log.Logger, portName, serviceName, namespace string, endpoint *net.SRV) (ServiceDiscoveryAgent, error)

Jump to

Keyboard shortcuts

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