core

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capability

type Capability string

type ComplianceEngine

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

func NewComplianceEngine

func NewComplianceEngine(
	checker *compliance.ComplianceChecker,
	exchange *quantum.KeyExchange,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *ComplianceEngine

func (*ComplianceEngine) ProcessRequest

func (ce *ComplianceEngine) ProcessRequest(ctx context.Context, req *Request) (*Response, error)

func (*ComplianceEngine) RegisterProcessor

func (ce *ComplianceEngine) RegisterProcessor(name string, processor Processor) error

type Processor

type Processor interface {
	Process(context.Context, *Request) (*Response, error)
	Validate(context.Context, *Request) error
	GetCapabilities() []Capability
}

type Request

type Request struct {
	ID           string
	Type         RequestType
	Data         []byte
	Metadata     map[string]interface{}
	Priority     int
	Deadline     time.Time
	Requirements []Requirement
}

type RequestType

type RequestType string

type Response

type Response struct {
	RequestID    string
	Status       Status
	Result       []byte
	Metrics      map[string]float64
	CompletedAt  time.Time
	Attestations []Attestation
}

type Status

type Status string
const (
	StatusPending  Status = "pending"
	StatusComplete Status = "complete"
	StatusFailed   Status = "failed"
)

Jump to

Keyboard shortcuts

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