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