structs

package
v0.0.0-...-a4bd7fa Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: MPL-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 EnterpriseMeta

type EnterpriseMeta struct {
	Namespace string
	Partition string
}

func NewEnterpriseMeta

func NewEnterpriseMeta(ap, ns string) *EnterpriseMeta

type ExtensionData

type ExtensionData struct {
	// PrivateKeyPEM is the TLS certificate private key in PEM format.
	PrivateKeyPEM string `json:"privateKeyPEM"`
	// CertPEM is the TLS certificate in PEM format.
	CertPEM string `json:"certPEM"`
	// RootCertPEM is the TLS root CA certificate in PEM format.
	RootCertPEM string `json:"rootCertPEM"`
	// TrustDomain is the trusted domain that the service belongs to.
	TrustDomain string `json:"trustDomain"`
	// Peers is the list of peers.
	// TODO: Add support for cluster peering.
	Peers []Peer `json:"peers,omitempty"`
}

ExtensionData holds the information that a Lambda function needs to call services in the Consul service mesh.

func (ExtensionData) Equals

func (x ExtensionData) Equals(y ExtensionData) bool

type Peer

type Peer struct {
	// Name of the peer.
	Name string `json:"name"`
	// TrustDomain is the trusted domain of the peer.
	TrustDomain string `json:"trustDomain"`
}

Peer holds the information for a Consul peer.

type Service

type Service struct {
	*EnterpriseMeta
	Name        string
	Port        int
	Datacenter  string
	TrustDomain string
	Subset      string
}

func ParseUpstream

func ParseUpstream(s string) (Service, error)

ParseUpstream parses a string in unlabeled upstream format into a Service instance.

func (Service) DatacenterOrDefault

func (s Service) DatacenterOrDefault() string

func (Service) ExtensionPath

func (s Service) ExtensionPath() string

func (Service) NamespaceOrDefault

func (s Service) NamespaceOrDefault() string

func (Service) PartitionOrDefault

func (s Service) PartitionOrDefault() string

func (Service) SNI

func (s Service) SNI() string

func (Service) SpiffeID

func (s Service) SpiffeID() string

Jump to

Keyboard shortcuts

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