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 ¶
func (s *Server) For(host packagebridge.HostIdentity) kernelorderv1.KernelOrderServer
For returns the KernelOrder server that host reaches; it has the shape of packagebridge.KernelOrderProvider.
Click to show internal directories.
Click to hide internal directories.