identity_domain_controller

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 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 Constructor

type Constructor func(
	ctx context.Context,
	le *logrus.Entry,
	handler identity_domain.Handler,
) (identity_domain.Domain, error)

Constructor constructs a Domain with common parameters.

type Controller

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

Controller implements a common Domain controller.

func NewController

func NewController(
	le *logrus.Entry,
	bus bus.Bus,
	controllerID string,
	controllerVer semver.Version,
	domainInfo *identity_domain.DomainInfo,
	resolveSelectIdentityDomain bool,
	ctor Constructor,
) *Controller

NewController constructs a new identity domain controller.

ResolveSelectIdentityDomain indicates this domain should resolve any SelectIdentityDomain directive with its own domain info.

func (*Controller) Close

func (c *Controller) Close() error

Close releases any resources used by the controller. Error indicates any issue encountered releasing.

func (*Controller) Execute

func (c *Controller) Execute(ctx context.Context) error

Execute executes the domain. Returning nil ends execution. Returning an error triggers a retry with backoff.

func (*Controller) GetControllerID

func (c *Controller) GetControllerID() string

GetControllerID returns the controller ID.

func (*Controller) GetControllerInfo

func (c *Controller) GetControllerInfo() *controller.Info

GetControllerInfo returns information about the controller.

func (*Controller) GetDomain

func (c *Controller) GetDomain(ctx context.Context) (identity_domain.Domain, error)

GetDomain returns the controlled domain. This may be nil until the transport is constructed.

func (*Controller) GetDomainInfo

func (c *Controller) GetDomainInfo() *identity_domain.DomainInfo

GetDomainInfo returns the domain info.

func (*Controller) HandleDirective

func (c *Controller) HandleDirective(ctx context.Context, di directive.Instance) ([]directive.Resolver, error)

HandleDirective asks if the handler can resolve the directive. If it can, it returns a resolver. If not, returns nil. Any unexpected errors are returned for logging. It is safe to add a reference to the directive during this call.

Jump to

Keyboard shortcuts

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