svcache

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceKey

type ServiceKey struct {
	Host     string              // The hostname where the service is accessible, e.g., "api.example.com".
	Port     int                 // The port number on which the service listens, e.g., 80 for HTTP or 443 for HTTPS.
	Protocol service.ServiceType // The protocol used by the service, either HTTP or HTTPS, determining how requests are handled.
}

ServiceKey uniquely identifies a service within the Terraster application. It is composed of the service's host, port, and protocol, ensuring that each service can be distinctly referenced and managed within the system.

func (ServiceKey) String

func (k ServiceKey) String() string

String generates a standardized string representation of the ServiceKey. This format concatenates the Host, Port, and Protocol fields separated by pipes ("|"), resulting in a string like "api.example.com|443|https". This representation is particularly useful for creating unique keys for maps or caches, ensuring that each service can be efficiently and accurately retrieved based on its unique identifier.

Jump to

Keyboard shortcuts

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