instance

package
v0.0.0-...-5bb5805 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultServiceInstance

type DefaultServiceInstance struct {
	InstanceId string
	ServiceId  string
	Host       string
	Port       int
	Secure     bool
	Metadata   map[string]string
}

*

*

func NewDefaultServiceInstance

func NewDefaultServiceInstance(serviceId string, host string, port int, secure bool,
	metadata map[string]string, instanceId string) (*DefaultServiceInstance, error)

*

  • default

func (DefaultServiceInstance) GetHost

func (serviceInstance DefaultServiceInstance) GetHost() string

func (DefaultServiceInstance) GetInstanceId

func (serviceInstance DefaultServiceInstance) GetInstanceId() string

func (DefaultServiceInstance) GetMetadata

func (serviceInstance DefaultServiceInstance) GetMetadata() map[string]string

func (DefaultServiceInstance) GetPort

func (serviceInstance DefaultServiceInstance) GetPort() int

func (DefaultServiceInstance) GetServiceId

func (serviceInstance DefaultServiceInstance) GetServiceId() string

func (DefaultServiceInstance) IsSecure

func (serviceInstance DefaultServiceInstance) IsSecure() bool

type ServiceInstance

type ServiceInstance interface {

	// return The unique instance ID as registered.
	GetInstanceId() string

	// return The service ID as registered.
	GetServiceId() string

	// return The hostname of the registered service instance.
	GetHost() string

	// return The port of the registered service instance.
	GetPort() int

	// return Whether the port of the registered service instance uses HTTPS.
	IsSecure() bool

	// return The key / value pair metadata associated with the service instance.
	GetMetadata() map[string]string
}

*

  • Represents an instance of a service in a discovery system.

Jump to

Keyboard shortcuts

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