kernelorder

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package kernelorder serves the KernelOrder contract (sdk/api/kernelorder/v1, docs/architecture/order-service.md) to official packages: the order writes that span domains, which the kernel performs in one transaction with the same code its legacy handlers use. Every call is authorized for its capability against the calling host's current generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	AuthorizeCapability(ctx context.Context, host packagebridge.HostIdentity, capability string) error
}

Authorizer admits a calling host to a capability.

type Server

type Server struct {
	DB         *gorm.DB
	Authorizer Authorizer
	// Now defaults to time.Now.
	Now func() time.Time
}

Server holds what every host's KernelOrder calls share.

func (*Server) For

For returns the KernelOrder server that host reaches; it has the shape of packagebridge.KernelOrderProvider.

Jump to

Keyboard shortcuts

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