util

package
v0.6.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

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 atypes.Endpoint_Kind) uint

func GetEndpointQuantityOfResourceUnits

func GetEndpointQuantityOfResourceUnits(r atypes.Resources, kind atypes.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