tenant

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tenant provides multi-tenant protocol library isolation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditEntry

type AuditEntry struct {
	TenantID string `json:"tenant_id"`
	Action   string `json:"action"`
	Resource string `json:"resource"`
}

AuditEntry represents an audit log entry.

type Manager

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

Manager manages multi-tenant protocol libraries.

func NewManager

func NewManager() *Manager

NewManager creates a new tenant manager.

func (*Manager) AddProtocol

func (m *Manager) AddProtocol(tenantID, protocol string) error

AddProtocol adds a protocol to a tenant.

func (*Manager) CreateTenant

func (m *Manager) CreateTenant(id, name string, quota Quota) error

CreateTenant creates a new tenant.

func (*Manager) Describe

func (m *Manager) Describe() string

Describe returns a description of all tenants.

func (*Manager) GetAuditLog

func (m *Manager) GetAuditLog(tenantID string) []AuditEntry

GetAuditLog returns audit entries for a tenant.

type Quota

type Quota struct {
	MaxProtocols int `json:"max_protocols"`
	MaxRequests  int `json:"max_requests_per_min"`
}

Quota represents tenant resource quotas.

type Tenant

type Tenant struct {
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Protocols []string `json:"protocols"`
	Quota     Quota    `json:"quota"`
}

Tenant represents a tenant with isolated protocol library.

Jump to

Keyboard shortcuts

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