ufsclients

package
v0.0.0-...-c537dde Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package ufsclients contains ready-made UFS clients that can be conveniently instantiated from other services or from the command line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUFSClientFromCLI

func NewUFSClientFromCLI(ctx context.Context, ufsHostname string, authFlags *authcli.Flags, prpcOptions *prpc.Options) (ufsAPI.FleetClient, error)

NewUFSClientFromCLI creates a UFS client that authenticates using mechanisms available to CLI tools using standard mechanisms in the LUCI, infra, and infra_internal repos.

func NewUFSClientFromServer

func NewUFSClientFromServer(ctx context.Context, ufsHostname string, prpcOptions *prpc.Options) (ufsAPI.FleetClient, error)

NewUFSClientFromServer creates a client to UFS from a LUCI server service.

Note that this uses auth.AsSelf to authenticate to UFS. As of 2025-01-23 this is what most services do in practice, but it is an assumption.

TODO(gregorynisbet): check the UFS namespace and reject requests if there is no namespace.

func SetUFSNamespace

func SetUFSNamespace(ctx context.Context, namespace string) context.Context

SetUFSNamespace sets the UFS namespace in the context.

TODO(gregorynisbet): namespace validation

Types

This section is empty.

Jump to

Keyboard shortcuts

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