boundary

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package boundary names the kinds of IO that cross a service's boundary, and so pass through SPECTRE's proxies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

Catalog is every kind of IO that the protocol servers in one binary support.

func NewCatalog

func NewCatalog(supports ...Support) (*Catalog, error)

NewCatalog collects what protocol servers support, grouped by protocol with ingress first, so listings are stable. A kind supported twice is an error.

func (*Catalog) Support added in v0.36.0

func (c *Catalog) Support(kind Kind) (Support, bool)

Support returns what the catalog supports for kind, if it supports it.

func (*Catalog) Supports

func (c *Catalog) Supports() []Support

Supports returns every supported kind of IO in listing order.

type Direction

type Direction string

Direction names the proxy that carries traffic: ingress into the service, or egress from it to a dependency.

const (
	// Ingress traffic is requests to the proxied service.
	Ingress Direction = "ingress"
	// Egress traffic is requests from the service to a dependency.
	Egress Direction = "egress"
)

type Kind

type Kind struct {
	Direction Direction
	Protocol  Protocol
}

Kind is one kind of IO that a proxy intercepts, written "ingress[http]".

func (Kind) String

func (k Kind) String() string

String returns the kind as written in the migration state, e.g. "ingress[http]".

type Protocol

type Protocol string

Protocol names the protocol that a proxy intercepts, e.g. "http".

const ProtocolHTTP Protocol = "http"

ProtocolHTTP is the protocol of HTTP servers, including gRPC and Connect.

type Setting

type Setting struct {
	Name        string `json:"name"`
	Required    bool   `json:"required"`
	Description string `json:"description"`
	// Key describes what keys the entries, or is empty for a plain value.
	Key string `json:"key,omitzero"`
	// Unique keyed entries may belong to only one node, such as a route.
	Unique bool `json:"unique,omitzero"`
	// Entry lists the settings that each entry takes.
	Entry []Setting `json:"entry,omitzero"`
}

Setting is one field that a node's table for a kind of IO can hold. With a Key, it is a table of entries, each holding the Entry settings.

type Support

type Support struct {
	Kind        Kind
	Description string
	Settings    []Setting
}

Support is a kind of IO that a protocol server proxies, with a description of the code that performs it and the settings a migration state node of it takes.

Jump to

Keyboard shortcuts

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