scopeset

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scopeset handles loading and compilation of scope definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router routes raw JSON events to a scope name using a pre-compiled flat slice. The deepest matching node in the scope tree wins.

func Load

func Load(dir string) (*Router, error)

Load reads all scope YAML files from dir and returns a compiled Router.

func (*Router) HasScope

func (r *Router) HasScope(name string) bool

HasScope reports whether the named scope exists in this router.

func (*Router) Route

func (r *Router) Route(raw string) string

Route returns the name of the deepest matching scope node, or "" if none match.

func (*Router) ScopeNames

func (r *Router) ScopeNames() []string

ScopeNames returns all scope names defined in this router.

Jump to

Keyboard shortcuts

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