pluginclient

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pluginclient is CVT's core-side glue between pkg/cvt.Hooks and internal/pluginmgr. It translates hook calls into typed plugin RPCs, records metrics + audit, and applies the per-plugin on_error policy.

Core imports this package and injects HooksAdapter wherever pkg/cvt.Hooks is required. pkg/cvt itself stays free of internal/* imports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HooksAdapter

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

HooksAdapter implements pkg/cvt.Hooks by dispatching to whichever plugin is bound to each hook in the config. Unbound hooks delegate to cvt.NoopHooks (read hooks return nil, events are no-ops).

func NewHooks

func NewHooks(mgr *pluginmgr.Manager) *HooksAdapter

NewHooks constructs an adapter. The manager's config controls which plugin (if any) handles each hook.

func (*HooksAdapter) FetchSchema

FetchSchema invokes the plugin bound to the fetch_schema hook, if any. Returns (nil, nil) when no plugin is bound — the caller falls back to direct resolution.

func (*HooksAdapter) OnBreakingChangeDetected

OnBreakingChangeDetected invokes the plugin bound to on_breaking_change_detected, if any.

func (*HooksAdapter) OnValidationFailed

OnValidationFailed invokes the plugin bound to on_validation_failed.

func (*HooksAdapter) RegisterConsumerUsage

RegisterConsumerUsage invokes the plugin bound to the register_consumer_usage hook, if any.

Jump to

Keyboard shortcuts

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