policies

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInferenceEnabled = true
)
View Source
const (
	DefaultToolEnabled = true
)

Variables

View Source
var PoliciesProvider api.PoliciesProvider = &Provider{}

Functions

func GetPolicies

func GetPolicies(ctx context.Context) *api.Policies

func ReadToml added in v0.0.10

func ReadToml(config string) (*api.Policies, error)

func WithPolicies

func WithPolicies(ctx context.Context, policies *api.Policies) context.Context

Types

type Provider added in v0.0.10

type Provider struct{}

func (*Provider) IsInferenceEnabledByPolicies added in v0.0.10

func (p *Provider) IsInferenceEnabledByPolicies(feature api.Feature[api.InferenceAttributes], policies *api.Policies) bool

func (*Provider) IsToolEnabledByPolicies added in v0.0.10

func (p *Provider) IsToolEnabledByPolicies(feature api.Feature[api.ToolsAttributes], policies *api.Policies) bool

func (*Provider) Read added in v0.0.10

func (p *Provider) Read(policiesFile string) (*api.Policies, error)

Jump to

Keyboard shortcuts

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