services

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package services names the gRPC services the proxy can forward and resolves their descriptors.

Importing this package links each service's generated code into the binary, which is what registers its descriptors with protoregistry.GlobalFiles. Resolution elsewhere in the proxy (namespace extraction, the reflective forwarder, configuration validation) reads that global registry, so a service absent here cannot be routed or forwarded no matter what configuration asks for.

Index

Constants

View Source
const (
	// WorkflowService is the Temporal service every client, worker, and UI uses.
	WorkflowService = "temporal.api.workflowservice.v1.WorkflowService"

	// OperatorService backs `temporal operator ...` and the UI's search
	// attribute and Nexus endpoint views.
	OperatorService = "temporal.api.operatorservice.v1.OperatorService"

	// Reflection is the current gRPC server reflection service.
	Reflection = "grpc.reflection.v1.ServerReflection"

	// ReflectionV1Alpha is the superseded reflection service. Clients such as
	// grpcurl probe v1 and fall back to it, so allowing one allows both.
	ReflectionV1Alpha = "grpc.reflection.v1alpha.ServerReflection"
)

Variables

This section is empty.

Functions

func All

func All() []string

All returns every forwardable service name, including each service's compatibility alias: the full set a name might need to be checked against, as opposed to Known's plain spelling of it. A caller checking membership against "the complete set of names that count as forwardable" should use All.

func Default

func Default() []string

Default returns the services exposed when configuration names none: the two a normal client, worker, CLI, or UI needs. Reflection is excluded because service discovery is opt-in.

func Known

func Known() []string

Known returns every service the proxy can forward, which is every service whose descriptors this package links in. It is the universe configuration may select from, and the set the namespace completeness guard audits.

func Resolve

func Resolve(name string) (protoreflect.ServiceDescriptor, error)

Resolve returns the descriptor for the named service, failing when the name is not registered (its package is not linked in) or names something other than a service.

Types

type Allowlist

type Allowlist interface {
	// Allows reports whether the named service was admitted. It matches a
	// service full name only, so a caller holding a gRPC full method must strip
	// the method first.
	Allows(string) bool

	// ServiceNames returns the admitted names in sorted order, for callers that
	// publish the set rather than query it.
	ServiceNames() []string
}

Allowlist is the set of services the proxy will forward. One built from no names admits nothing.

func NewAllowlist

func NewAllowlist(names []string) Allowlist

NewAllowlist builds an Allowlist admitting names and their compatibility aliases, so allowing a service also allows the spellings a client may fall back to.

Jump to

Keyboard shortcuts

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