protoreg

package module
v6.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 13 Imported by: 0

README

Documentation

Overview

Package protoreg provides a RoadRunner plugin for protobuf registry management. It parses .proto files and their dependencies, building a registry of types and services that can be used by other plugins such as gRPC for dynamic message handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProtoPath []string `mapstructure:"proto_path"`
	Files     []string `mapstructure:"files"`
}

func (*Config) InitDefaults

func (c *Config) InitDefaults() error

type Configurer

type Configurer interface {
	// UnmarshalKey takes a single key and unmarshal it into a Struct.
	UnmarshalKey(name string, out any) error
	// Has checks if a config section exists.
	Has(name string) bool
	// Experimental returns true if experimental mode is enabled.
	Experimental() bool
}

type Logger

type Logger interface {
	NamedLogger(name string) *slog.Logger
}

type Plugin

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

func (*Plugin) Init

func (p *Plugin) Init(cfg Configurer, log Logger) error

func (*Plugin) InitRegistry

func (p *Plugin) InitRegistry() (*ProtoRegistry, error)

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) ProtoRegistry

func (p *Plugin) ProtoRegistry() *ProtoRegistry

ProtoRegistry returns a protobuf registry

func (*Plugin) Provides

func (p *Plugin) Provides() []*dep.Out

type ProtoRegistry

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

func (*ProtoRegistry) FindMethodByFullPath

func (reg *ProtoRegistry) FindMethodByFullPath(method string) (*desc.MethodDescriptor, error)

FindMethodByFullPath finds a method descriptor by full method path

func (*ProtoRegistry) Registry

func (reg *ProtoRegistry) Registry() *protoresolve.Registry

Registry returns the underlying registry

func (*ProtoRegistry) Services

func (reg *ProtoRegistry) Services() map[string]*desc.ServiceDescriptor

Services returns the service descriptors map

type Registry

type Registry interface {
	Registry() *protoresolve.Registry
	Services() map[string]*desc.ServiceDescriptor
	FindMethodByFullPath(method string) (*desc.MethodDescriptor, error)
}

Jump to

Keyboard shortcuts

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