dubbo

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DubboCodec

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

DubboCodec NewDubboCodec creates the dubbo codec.

func NewDubboCodec

func NewDubboCodec(opts ...Option) *DubboCodec

NewDubboCodec creates a new codec instance.

func (*DubboCodec) Decode

func (m *DubboCodec) Decode(ctx context.Context, message remote.Message, in remote.ByteBuffer) error

Unmarshal decode method

func (*DubboCodec) Encode

func (m *DubboCodec) Encode(ctx context.Context, message remote.Message, out remote.ByteBuffer) error

Marshal encode method

func (*DubboCodec) Name

func (m *DubboCodec) Name() string

Name codec name

type Option

type Option struct {
	F func(o *Options)
}

func WithFileDescriptor added in v0.1.2

func WithFileDescriptor(fd *thrift_reflection.FileDescriptor) Option

WithFileDescriptor provides method annotations for DubboCodec. Adding method annotations allows you to specify the method parameters and method name on the Java side.

func WithJavaClassName

func WithJavaClassName(name string) Option

WithJavaClassName configures InterfaceName for server-side service and specifies target InterfaceName for client. Each client and service must have its own corresponding DubboCodec.

type Options

type Options struct {
	JavaClassName     string
	MethodAnnotations map[string]*hessian2.MethodAnnotation
	// store method name mapping of java -> go.
	// use the annotation method name + parameter types as the unique identifier.
	MethodNames map[string]string
}

func (*Options) Apply

func (o *Options) Apply(opts []Option)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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