feature

package
v0.0.0-...-c33b5b2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package feature configures and handles feature flags for use in the application

Index

Constants

View Source
const FeatureCustomRepos = "fleet-management.custom-repos"

FeatureCustomRepos is the const of the custom repo feature flag

View Source
const FeatureImageBuildMS = "fleet-management.images_iso"

FeatureImageBuildMS is the const of the ms build feature flag

Variables

View Source
var BuildUpdateRepoWithOldCommits = &Flag{Name: "edge-management.build_update_repo_with_old_commits", EnvVar: "FEATURE_BUILD_UPDATE_REPO_WITH_OLD_COMMITS"}

BuildUpdateRepoWithOldCommits is the feature flag for services.BuildUpdateRepo() to enable oldCommits feature

View Source
var CleanUPDeleteImages = &Flag{Name: "edge-management.cleanup_delete_images", EnvVar: "FEATURE_CLEANUP_DELETE_IMAGES"}

CleanUPDeleteImages is a feature flag to use for cleanup delete images

View Source
var CleanUPDevices = &Flag{Name: "edge-management.cleanup_devices", EnvVar: "FEATURE_CLEANUP_DEVICES"}

CleanUPDevices is a feature flag to use for cleanup devices

View Source
var CleanUPImages = &Flag{Name: "edge-management.cleanup_images", EnvVar: "FEATURE_CLEANUP_IMAGES"}

CleanUPImages is a feature flag to use for cleanup images

View Source
var CleanUPOrphanCommits = &Flag{Name: "edge-management.cleanup_orphan_commits", EnvVar: "FEATURE_CLEANUP_ORPHAN_COMMITS"}

CleanUPOrphanCommits is a feature flag to use for cleanup orphan commits

View Source
var ContentSources = &Flag{Name: "edge-management.content_sources", EnvVar: "FEATURE_CONTENT_SOURCES"}

ContentSources is a feature flag to use for code related to Parity and custom repositories

View Source
var DeviceSync = &Flag{Name: "edge-management.device_sync", EnvVar: "DEVICE_SYNC"}

DeviceSync is the feature flag for routes.CreateImageUpdate() EDA code

View Source
var DeviceSyncCreate = &Flag{Name: "edge-management.device_sync_create", EnvVar: "DEVICE_SYNC_CREATE"}

DeviceSyncCreate is the feature flag for routes.CreateImageUpdate() EDA code

View Source
var DeviceSyncDelete = &Flag{Name: "edge-management.device_sync_delete", EnvVar: "DEVICE_SYNC_DELETE"}

DeviceSyncDelete is the feature flag for routes.CreateImageUpdate() EDA code

View Source
var EdgeParityGroupsMigration = &Flag{Name: "edgeParity.groups-migration", EnvVar: "FEATURE_EDGE_PARITY_GROUPS_MIGRATION"}

EdgeParityGroupsMigration toggles edge parity groups migration

View Source
var EdgeParityInventoryGroupsEnabled = &Flag{Name: "edgeParity.inventory-groups-enabled", EnvVar: "FEATURE_INVENTORY_GROUPS_ENABLED"}

EdgeParityInventoryGroupsEnabled is a feature flag for inventory groups usage

View Source
var EdgeParityInventoryRbac = &Flag{Name: "edgeParity.inventory-rbac", EnvVar: "FEATURE_INVENTORY_RBAC"}

EdgeParityInventoryRbac is a feature flag for inventory rbac usage

View Source
var EnforceEdgeGroups = &Flag{Name: "edge-management.enforce_edge_groups", EnvVar: "FEATURE_ENFORCE_EDGE_GROUPS"}

EnforceEdgeGroups is a feature flag to query to query unleash whether the org is enforced to use edge groups

View Source
var GlitchtipLogging = &Flag{Name: "edge-management.glitchtip_logging", EnvVar: "GLITCHTIP_LOGGING"}

GlitchtipLogging is the feature flag for reporting errors to GlitchTip

View Source
var HideCreateGroup = &Flag{Name: "edge-management.hide-create-group", EnvVar: "FEATURE_HIDE_CREATE_GROUP"}

HideCreateGroup toggles creation of static deltas

View Source
var JobQueue = &Flag{Name: "edge-management.job_queue", EnvVar: "FEATURE_JOBQUEUE"}

JOB QUEUE FLAGS

View Source
var KafkaLogging = &Flag{Name: "edge-management.kafka_logging", EnvVar: "KAFKA_LOGGING"}

KafkaLogging is the feature flag for logging kafka messages

View Source
var MigrateCustomRepositories = &Flag{Name: "edge-management.migrate_custom_repositories", EnvVar: "FEATURE_MIGRATE_CUSTOM_REPOSITORIES"}

MigrateCustomRepositories is a feature flag to use for code related to custom repositories migration to content-sources

View Source
var PostMigrateDeleteCustomRepositories = &Flag{Name: "edge-management.post_migrate_delete_repos", EnvVar: "FEATURE_POST_MIGRATE_DELETE_REPOSITORIES"}

PostMigrateDeleteCustomRepositories is a feature flag to use for deletion of repos after migration

View Source
var PulpIntegration = &Flag{Name: "edge-management.pulp_integration", EnvVar: "FEATURE_PULP_INTEGRATION"}

PulpIntegration covers the overall integration of pulp and deprecation of AWS storage

View Source
var PulpIntegrationDisableAWSRepoStore = &Flag{Name: "edge-management.pulp_integration_disable_awsrepostore", EnvVar: "FEATURE_PULP_INTEGRATION_DISABLE_AWSREPOSTORE"}

PulpIntegrationDisableAWSRepoStore disables the AWS repo store process for development

View Source
var PulpIntegrationUpdateViaPulp = &Flag{Name: "edge-management.pulp_integration_updateviapulp", EnvVar: "FEATURE_PULP_INTEGRATION_UPDATEVIAPULP"}

PulpIntegrationUpdateViaPulp uses the Pulp Distribution URL for image and system updates

View Source
var SilentGormLogging = &Flag{Name: "edge-management.silent_gorm_logging", EnvVar: "FEATURE_SILENT_GORM_LOGGING"}

SilentGormLogging toggles noisy logging from Gorm (using for tests during development on slow machines/connections

View Source
var SkipUpdateRepo = &Flag{Name: "edge-management.skip_update_repo", EnvVar: "FEATURE_SKIP_UPDATE_REPO"}

SkipUpdateRepo is a feature flag to skip the process of download and re-upload of update repositories

View Source
var StorageImagesRepos = &Flag{Name: "edge-management.storage_images_repos", EnvVar: "STORAGE_IMAGES_REPOS"}

StorageImagesRepos is the feature flag to use storage.images-repos when updating images or creating ISO artifacts

Functions

func CheckFeature

func CheckFeature(feature string, options ...unleash.FeatureOption) bool

CheckFeature checks to see if a given feature is available

func CheckFeatureCtx

func CheckFeatureCtx(ctx context.Context, feature string, options ...unleash.FeatureOption) bool

CheckFeature checks to see if a given feature is available with context

Types

type Flag

type Flag struct {
	Name   string
	EnvVar string
}

Flag defines names for feature flag service and local env

func (*Flag) IsEnabled

func (ff *Flag) IsEnabled(options ...unleash.FeatureOption) bool

IsEnabled checks both the feature flag service and env vars on demand

func (*Flag) IsEnabledCtx

func (ff *Flag) IsEnabledCtx(ctx context.Context, options ...unleash.FeatureOption) bool

IsEnabledCtx checks both the feature flag service and env vars on demand. Organization ID is passed from the context if present.

func (*Flag) IsEnabledLocal

func (ff *Flag) IsEnabledLocal() bool

IsEnabledLocal returns a bool directly from the environment. Use before Unleash is init'd

Jump to

Keyboard shortcuts

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