featureflags

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 10 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 featureflags shares connector-service flags without requiring telemetry or a session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache shares values per workspace (normalized host when workspace ID is unavailable). Acquire a reference before reading, and Release it when the consumer closes.

func GetCache

func GetCache() *Cache

GetCache returns the process-wide cache shared by driver consumers.

func (*Cache) Acquire

func (c *Cache) Acquire(host string, workspaceID ...string) *featureFlagContext

Acquire increments the reference count without making a request.

func (*Cache) GetBool

func (c *Cache) GetBool(ctx context.Context, request Request, name string) (bool, error)

GetBool defaults to false for absent/null flags; malformed values return false and an error.

func (*Cache) GetDouble

func (c *Cache) GetDouble(ctx context.Context, request Request, name string) (float64, error)

func (*Cache) GetInt32

func (c *Cache) GetInt32(ctx context.Context, request Request, name string) (int32, error)

func (*Cache) GetInt64

func (c *Cache) GetInt64(ctx context.Context, request Request, name string) (int64, error)

func (*Cache) GetString

func (c *Cache) GetString(ctx context.Context, request Request, name string) (string, error)

func (*Cache) GetStringList

func (c *Cache) GetStringList(ctx context.Context, request Request, name string) ([]string, error)

func (*Cache) Release

func (c *Cache) Release(host string, workspaceID ...string)

Release removes the entry when its last consumer closes.

type Request

type Request struct {
	Host, WorkspaceID, DriverVersion, UserAgent string
	HTTPClient                                  *http.Client
}

Request provides caller-owned authenticated transport, usable before opening a session. Cache entries retain only values, never credentials or HTTP clients.

Jump to

Keyboard shortcuts

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