protoreg

package module
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 12 Imported by: 0

README

Documentation

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) *zap.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