Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCapacityExceeded = errors.New("licensed capacity limit exceeded")
ErrCapacityExceeded is returned when usage exceeds authorized license limits.
var ErrFeatureNotEntitled = errors.New("feature not included in active license entitlement")
ErrFeatureNotEntitled is returned when an enterprise feature is not licensed.
var ErrInvalidLicenseToken = errors.New("invalid or malformed license token")
ErrInvalidLicenseToken is returned when a license signature or format is invalid.
var ErrLicenseExpired = errors.New("commercial license has expired")
ErrLicenseExpired is returned when a commercial license has expired.
Functions ¶
This section is empty.
Types ¶
type CapacityDescriptor ¶
type CapacityDescriptor interface {
// MaxNodes returns the maximum allowable active nodes, or -1 if unlimited.
MaxNodes() int
// MaxDatasources returns the maximum number of connected databases, or -1 if unlimited.
MaxDatasources() int
// MaxTenants returns the maximum number of managed organizational tenants.
MaxTenants() int
// MetricLimit returns the licensed limit for a custom named metric.
MetricLimit(metric string) (int64, bool)
}
CapacityDescriptor defines the metrics and boundaries governing licensed infrastructure.
type CatalogSyncRequest ¶
type CatalogSyncRequest struct {
NodeID string
ProjectID string
LocalVersion string
Checksum string
}
CatalogSyncRequest contains parameters for synchronizing catalog state with a coordinator.
type CatalogSyncResponse ¶
CatalogSyncResponse contains the coordinator's sync directive.
type CommunityCapacity ¶
type CommunityCapacity struct{}
CommunityCapacity implements CapacityDescriptor for the standalone community edition.
func (CommunityCapacity) MaxDatasources ¶
func (c CommunityCapacity) MaxDatasources() int
func (CommunityCapacity) MaxNodes ¶
func (c CommunityCapacity) MaxNodes() int
func (CommunityCapacity) MaxTenants ¶
func (c CommunityCapacity) MaxTenants() int
func (CommunityCapacity) MetricLimit ¶
func (c CommunityCapacity) MetricLimit(metric string) (int64, bool)
type CommunityVerifier ¶
type CommunityVerifier struct{}
CommunityVerifier provides a default verifier for community standalone deployments.
func (*CommunityVerifier) CheckCapacity ¶
func (*CommunityVerifier) HasFeature ¶
func (*CommunityVerifier) VerifyEntitlement ¶
func (v *CommunityVerifier) VerifyEntitlement(_ context.Context, _ string) (*EntitlementStatus, error)
type CoordinatorContract ¶
type CoordinatorContract interface {
// RegisterNode registers a running DataTug instance with the centralized coordinator.
RegisterNode(ctx context.Context, info NodeInfo) error
// Heartbeat sends periodic telemetry and health pings to the coordinator.
Heartbeat(ctx context.Context, nodeID string, stats NodeStats) error
// FetchEntitlement retrieves the latest authoritative entitlement status from the coordinator.
FetchEntitlement(ctx context.Context) (*EntitlementStatus, error)
// SyncCatalog coordinates catalog synchronization with the centralized enterprise registry.
SyncCatalog(ctx context.Context, req CatalogSyncRequest) (*CatalogSyncResponse, error)
}
CoordinatorContract defines the communication and synchronization boundary between DataTug instances and enterprise fleet coordinators.
type EntitlementStatus ¶
type EntitlementStatus struct {
Tier LicenseTier
CustomerName string
IssuedAt time.Time
ExpiresAt time.Time
Features []Feature
Capacity CapacityDescriptor
Signature string
}
EntitlementStatus describes the verified license state and granted capabilities.
type EntitlementVerifier ¶
type EntitlementVerifier interface {
// VerifyEntitlement inspects and validates a raw license token.
VerifyEntitlement(ctx context.Context, token string) (*EntitlementStatus, error)
// HasFeature verifies whether a specific enterprise capability is authorized.
HasFeature(ctx context.Context, feature Feature) (bool, error)
// CheckCapacity verifies that current usage of a metric does not violate limits.
CheckCapacity(ctx context.Context, metric string, currentUsage int64) error
}
EntitlementVerifier defines the contract for validating enterprise licenses and verifying feature availability without tight coupling to proprietary license servers.
func NewCommunityVerifier ¶
func NewCommunityVerifier() EntitlementVerifier
NewCommunityVerifier returns an EntitlementVerifier configured for community mode.
type Feature ¶
type Feature string
Feature identifies a commercial or enterprise feature capability.
const ( FeatureFleetCoordination Feature = "fleet_coordination" FeatureMultiTenant Feature = "multi_tenant" FeatureEnterpriseRBAC Feature = "enterprise_rbac" FeatureAuditLogging Feature = "audit_logging" FeatureDistributedCatalog Feature = "distributed_catalog" FeatureManagedMeaningGraph Feature = "managed_meaning_graph" )
type LicenseTier ¶
type LicenseTier string
LicenseTier represents the tier level of a DataTug installation.
const ( TierCommunity LicenseTier = "community" TierEvaluation LicenseTier = "evaluation" TierEnterprise LicenseTier = "enterprise" )