Documentation
¶
Index ¶
- Variables
- func BuiltinClientConn(name string) (*grpc.ClientConn, error)
- func BuiltinClientConnAs(name, actor string) (*grpc.ClientConn, error)
- func BuiltinClientConnForNode(name, actor, node string) (*grpc.ClientConn, error)
- func BuiltinDialer() grpc.DialOption
- func DefaultWorld() []byte
- func GetBuiltinListener() *bufconn.Listener
- func HTTPHandler() http.Handler
- func Handle(pattern string, handler http.Handler)
- func HandleFunc(pattern string, handler http.HandlerFunc)
- func PluginHandle(name, pattern string, handler http.Handler)
- func PluginHandleFunc(name, pattern string, handler http.HandlerFunc)
- func PluginPath(name, rest string) string
- func Register(name string, ...)
- func ResetHTTPHandlers()
- func RestartAll()
- func StartAll(ctx context.Context, serverURL string)
- func ValidatePath(path string) error
- type Builtin
- type Permissions
Constants ¶
This section is empty.
Variables ¶
var ServerURL string = "localhost:50051"
Functions ¶
func BuiltinClientConn ¶
func BuiltinClientConn(name string) (*grpc.ClientConn, error)
func BuiltinClientConnAs ¶ added in v1.0.0
func BuiltinClientConnAs(name, actor string) (*grpc.ClientConn, error)
BuiltinClientConnAs is like BuiltinClientConn but attributes the builtin's calls to the given actor identity. Use this for builtins (e.g. federation) that must not be evaluated as trusted in-process callers.
func BuiltinClientConnForNode ¶ added in v1.0.0
func BuiltinClientConnForNode(name, actor, node string) (*grpc.ClientConn, error)
BuiltinClientConnForNode is like BuiltinClientConnAs but also declares the remote node the connection relays on behalf of. The engine exposes it to policy as source.node so federation can be constrained to that node.
func BuiltinDialer ¶
func BuiltinDialer() grpc.DialOption
func DefaultWorld ¶
func DefaultWorld() []byte
DefaultWorld returns the base defaults with platform-specific overrides appended. Overrides redeclare entities by ID; LoadDefaults deduplicates keeping the last occurrence, so overrides fully replace their base counterparts.
func GetBuiltinListener ¶
func HTTPHandler ¶ added in v0.0.20
HTTPHandler returns a handler that delegates to the current shared mux. The indirection allows ResetHTTPHandlers to swap the underlying mux.
func Handle ¶ added in v0.0.20
Handle registers an HTTP handler on the shared builtin mux. Duplicate patterns on the same mux are silently ignored so builtins can call this unconditionally on every restart.
func HandleFunc ¶ added in v0.0.20
func HandleFunc(pattern string, handler http.HandlerFunc)
HandleFunc registers an HTTP handler function on the shared builtin mux. Duplicate patterns on the same mux are silently ignored.
func PluginHandle ¶ added in v0.0.23
PluginHandle mounts handler under /plugin/<name>/<pattern>. Each builtin owns the /plugin/<name>/ namespace; pick stable sub-paths. Pattern may include go 1.22+ method/wildcard syntax (e.g. "GET /cam/{id}").
func PluginHandleFunc ¶ added in v0.0.23
func PluginHandleFunc(name, pattern string, handler http.HandlerFunc)
PluginHandleFunc is the func variant of PluginHandle.
func PluginPath ¶ added in v0.0.23
PluginPath returns the canonical /plugin/<name>/<rest> URL path.
func ResetHTTPHandlers ¶ added in v0.0.20
func ResetHTTPHandlers()
ResetHTTPHandlers replaces the shared mux so that restarting builtins can re-register their HTTP routes without conflicting with old patterns.
func RestartAll ¶ added in v0.0.20
func RestartAll()
RestartAll cancels all running builtins and starts them again.
func ValidatePath ¶ added in v0.0.19
ValidatePath checks that the given file path is under the current working directory or one of the explicitly allowed paths (--allow-path).
Types ¶
type Permissions ¶
Permissions controls which local resources builtins are allowed to access. Set before calling StartAll.
var LocalPermissions Permissions
Directories
¶
| Path | Synopsis |
|---|---|
|
Package all imports all builtin controllers so that a single
|
Package all imports all builtin controllers so that a single |
|
Package controller provides a framework for managing entity-driven connectors.
|
Package controller provides a framework for managing entity-driven connectors. |
|
Package playground is a builtin designed for frontend developers to test configuration UIs.
|
Package playground is a builtin designed for frontend developers to test configuration UIs. |
|
Package plugins implements a builtin controller that fetches a plugin registry index and presents each available plugin as a configurable entity.
|
Package plugins implements a builtin controller that fetches a plugin registry index and presents each available plugin as a configurable entity. |
|
Package simcam implements a camera simulator.
|
Package simcam implements a camera simulator. |