actorlookup

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package actorlookup fetches the actor an exchange request names from ate-api-server. The control plugin is a sidecar in the ate-api-server pod, so it dials the loopback address and presents the pod identity certificate, which ate-api-server accepts as an mTLS client.

Index

Constants

This section is empty.

Variables

View Source
var ErrStale = errors.New("actor UID does not match the JWT")

ErrStale is returned when the actor at the name a JWT carries has a different UID: the actor was deleted and recreated since the JWT was minted.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address is the gRPC target, 127.0.0.1:443 in the pod.
	Address string
	// CAFile verifies the serving certificate.
	CAFile string
	// ServerName is the DNS name expected on the serving certificate, since
	// Address is not a name the certificate carries.
	ServerName string
	// ClientCredBundle is the PEM bundle with the pod identity certificate
	// and key.
	ClientCredBundle string
}

Config says how to reach ate-api-server. Every file is re-read on each handshake, so certificate rotation needs no restart.

type Lookup

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

Lookup resolves actors over one connection to ate-api-server.

func New

func New(cfg Config) (*Lookup, error)

New dials ate-api-server. The connection is lazy, so a server that is not up yet fails the first lookup rather than New.

func (*Lookup) Actor

Actor returns the actor the claims name. The claims come from a verified JWT, so the atespace and name are trusted, but the actor may have been recreated since, which the UID detects. A gRPC status error from ate-api-server, such as NotFound, is returned unchanged.

func (*Lookup) Close

func (l *Lookup) Close() error

Close closes the connection.

Jump to

Keyboard shortcuts

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