editions

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllFeatures = []FeatureInfo{
	{
		Name:        FeatureVectorSearch,
		Description: "Vector search with approximate nearest neighbor",
		Edition:     "Both (Community: HNSW, Enterprise: Vectorize)",
	},
	{
		Name:        FeatureCloudflareVectorize,
		Description: "Cloudflare Vectorize integration for 5M+ dimensions",
		Edition:     "Enterprise",
	},
	{
		Name:        FeatureR2Backups,
		Description: "Automated backups to Cloudflare R2 with zero egress",
		Edition:     "Enterprise",
	},
	{
		Name:        FeatureCDC,
		Description: "Change Data Capture streaming to Cloudflare Queues",
		Edition:     "Enterprise",
	},
	{
		Name:        FeatureGraphQL,
		Description: "GraphQL API endpoint with edge caching",
		Edition:     "Both",
	},
	{
		Name:        FeatureAdvancedMonitoring,
		Description: "Advanced metrics, tracing, and monitoring",
		Edition:     "Enterprise",
	},
	{
		Name:        FeatureMultiRegionReplication,
		Description: "Multi-region replication with automatic failover",
		Edition:     "Enterprise",
	},
	{
		Name:        FeatureCustomAuth,
		Description: "Custom authentication providers (SAML, OIDC, etc.)",
		Edition:     "Enterprise",
	},
}

AllFeatures returns information about all available features

FeatureSet defines which features are available for each edition

Functions

func Initialize

func Initialize()

Initialize sets up the edition based on detection

func IsCommunity

func IsCommunity() bool

IsCommunity returns true if running Community edition

func IsEnabled

func IsEnabled(feature Feature) bool

IsEnabled checks if a feature is enabled for the current edition

func IsEnterprise

func IsEnterprise() bool

IsEnterprise returns true if running Enterprise edition

func RequireEnterprise

func RequireEnterprise(feature string) error

RequireEnterprise returns an error if not running Enterprise edition

func RequireFeature

func RequireFeature(feature Feature) error

RequireFeature returns an error if the feature is not enabled

Types

type Edition

type Edition int

Edition represents the GraphDB edition (Community or Enterprise)

const (
	// Community is the open-source edition with custom vector search
	Community Edition = iota
	// Enterprise includes Cloudflare integrations (Vectorize, R2, Queues)
	Enterprise
)
var Current Edition = Community

Current holds the currently active edition

func DetectEdition

func DetectEdition() Edition

DetectEdition determines the edition from environment variables, config files, or license keys

func (Edition) String

func (e Edition) String() string

String returns the string representation of the edition

type Feature

type Feature string

Feature represents a feature that may be edition-specific

const (
	// FeatureVectorSearch enables vector search capabilities
	FeatureVectorSearch Feature = "vector_search"

	// FeatureCloudflareVectorize enables Cloudflare Vectorize integration (Enterprise only)
	FeatureCloudflareVectorize Feature = "cloudflare_vectorize"

	// FeatureR2Backups enables Cloudflare R2 backup integration
	FeatureR2Backups Feature = "r2_backups"

	// FeatureCDC enables Change Data Capture with Cloudflare Queues
	FeatureCDC Feature = "cdc"

	// FeatureGraphQL enables GraphQL API endpoint
	FeatureGraphQL Feature = "graphql"

	// FeatureAdvancedMonitoring enables advanced monitoring and metrics
	FeatureAdvancedMonitoring Feature = "advanced_monitoring"

	// FeatureMultiRegionReplication enables multi-region replication
	FeatureMultiRegionReplication Feature = "multi_region_replication"

	// FeatureCustomAuth enables custom authentication providers
	FeatureCustomAuth Feature = "custom_auth"
)

func GetEnabledFeatures

func GetEnabledFeatures() []Feature

GetEnabledFeatures returns all enabled features for the current edition

type FeatureInfo

type FeatureInfo struct {
	Name        Feature
	Description string
	Edition     string // "Community", "Enterprise", "Both"
}

FeatureInfo provides metadata about a feature

Jump to

Keyboard shortcuts

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