Help us shape the future of Go! Take the 2026 Go Developer Survey

agentutils

package
v1.124.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddTokenCacheModeFlag added in v1.64.0

func AddTokenCacheModeFlag(fl *pflag.FlagSet, f *string)

func DisplayAllAgents

func DisplayAllAgents(io *iostreams.IOStreams, agents []*gitlab.Agent) string

func GetKasK8SProxyURL

func GetKasK8SProxyURL(m *gitlab.Metadata) (string, error)

func ParseCacheID added in v1.78.0

func ParseCacheID(cacheID string) (string, int64, error)

ParseCacheID parses a cache ID in the format base64(gitlab-url)-agentID

Types

type CacheMode added in v1.64.0

type CacheMode = string
const (
	KeyringFilesystemFallback CacheMode = "keyring-filesystem-fallback"
	ForcedKeyringCacheMode    CacheMode = "force-keyring"
	ForcedFilesystemCacheMode CacheMode = "force-filesystem"
	NoCacheCacheMode          CacheMode = "no"
)

type CachedToken added in v1.78.0

type CachedToken struct {
	ID        string
	AgentID   int64
	GitLabURL string
	Token     *gitlab.PersonalAccessToken
	Source    string
	FilePath  string // For filesystem tokens (optional)
	Expired   bool   // For list command
	Revoked   bool   // For list command
}

CachedToken represents a cached agent token

func FilterByAgents added in v1.78.0

func FilterByAgents(tokens []CachedToken, agents []int64) []CachedToken

FilterByAgents filters a slice of cached tokens by agent IDs

Jump to

Keyboard shortcuts

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