protocolwrapper

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// FILTER is protocol key.
	FILTER = "filter"
)

Variables

This section is empty.

Functions

func BuildInvokerChain

func BuildInvokerChain(invoker protocol.Invoker, key string) protocol.Invoker

func GetProtocol

func GetProtocol() protocol.Protocol

nolint

func NewMockProtocolFilter

func NewMockProtocolFilter() protocol.Protocol

NewMockProtocolFilter creates a new mock protocol

Types

type FilterInvoker

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

FilterInvoker defines invoker and filter

func (*FilterInvoker) Destroy

func (fi *FilterInvoker) Destroy()

Destroy will destroy invoker

func (*FilterInvoker) GetURL

func (fi *FilterInvoker) GetURL() *common.URL

GetURL is used to get url from FilterInvoker

func (*FilterInvoker) Invoke

func (fi *FilterInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke is used to call service method by invocation

func (*FilterInvoker) IsAvailable

func (fi *FilterInvoker) IsAvailable() bool

IsAvailable is used to get available status

type ProtocolFilterWrapper

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

ProtocolFilterWrapper protocol in url decide who ProtocolFilterWrapper.protocol is

func (*ProtocolFilterWrapper) Destroy

func (pfw *ProtocolFilterWrapper) Destroy()

Destroy will destroy all invoker and exporter.

func (*ProtocolFilterWrapper) Export

Export service for remote invocation

func (*ProtocolFilterWrapper) Refer

func (pfw *ProtocolFilterWrapper) Refer(url *common.URL) protocol.Invoker

Refer a remote service

Jump to

Keyboard shortcuts

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