exchangeclient

package
v1.0.0-rc.3 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: 19 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 exchangeclient is the GCS node plugin's side of the credential exchange. For each transfer it trades the actor JWT atelet handed it for a GCS access token scoped to that actor's snapshot prefixes, caches the token and the storage client built with it under that JWT, and hands the client to the transfer. It is this binary's: a provider's own plugin brings its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address is the exchange's host and port, the ate-api-server Service.
	Address string
	// CAFile verifies the exchange's serving certificate.
	CAFile string
	// ServerName is the DNS name expected on that certificate.
	ServerName string
}

Config is how the exchange is reached.

type Source

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

Source implements objectstoreplugin.Credentials for GCS.

func New

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

New dials the exchange over TLS. Nothing is sent until the first transfer.

func (*Source) Client

func (s *Source) Client(ctx context.Context, actorJWT string, force bool) (objectstorage.ObjectStorage, error)

Client returns a storage client scoped to the actor actorJWT names: the cached one for that JWT while its token has at least credential.MinServeLifetime left, otherwise one built on a fresh exchange, which replaces the cached one. force skips the cache, after GCS refused a request made with the cached token, and asks the exchange to skip its own. A refused or nearly expired entry is dropped before the exchange, so it is not served again if the exchange fails or returns a token too short to keep. An exchange error reaches the caller unchanged.

func (*Source) Close

func (s *Source) Close() error

Close closes the connection to the exchange.

Jump to

Keyboard shortcuts

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