callpolicy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltinPolicy

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

BuiltinPolicy is the default call policy that enforces module capability checks. When strict mode is enabled (MUXCORE_STRICT_CALL_POLICY=true), calls from modules that lack a matching capability for the target are denied. In non-strict mode (default), all calls are allowed but capability mismatches are logged as warnings — this provides soft enforcement during migration.

func NewBuiltinPolicy

func NewBuiltinPolicy(reg contracts.Registry) *BuiltinPolicy

NewBuiltinPolicy creates a policy backed by the given registry. Set MUXCORE_STRICT_CALL_POLICY=true to enable hard denial of capability-mismatched calls.

func (*BuiltinPolicy) AllowCall

func (p *BuiltinPolicy) AllowCall(ctx context.Context, callerModuleID, targetModuleID, method string) (bool, error)

AllowCall implements contracts.CallPolicyProvider.

func (*BuiltinPolicy) Strict

func (p *BuiltinPolicy) Strict() bool

Strict reports whether hard denial is active.

Jump to

Keyboard shortcuts

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