kernelsubscriber

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package kernelsubscriber serves the KernelSubscriber contract (sdk/api/kernelsubscriber/v1, docs/architecture/subscriber-service.md) to official packages: shared subscriber state behind internal/subscriber and the kernel's user update path. Every call is authorized for its method family's 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 method family.

type Server

type Server struct {
	DB         *gorm.DB
	Authorizer Authorizer
	// Now defaults to time.Now.
	Now func() time.Time
	// Config returns the configuration the subscription summary's link
	// settings read (app.subscribe_path); it defaults to config.Get.
	Config func() *config.Config
}

Server holds what every host's KernelSubscriber calls share.

func (*Server) For

For returns the KernelSubscriber server that host reaches; it has the shape of packagebridge.KernelSubscriberProvider.

Jump to

Keyboard shortcuts

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