Help us shape the future of Go! Take the 2026 Go Developer Survey

rest

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const REST = "rest"

Variables

This section is empty.

Functions

func GetRestProtocol

func GetRestProtocol() protocol.Protocol

GetRestProtocol get a rest protocol

Types

type RestExporter

type RestExporter struct {
	protocol.BaseExporter
}

nolint

func NewRestExporter

func NewRestExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map) *RestExporter

NewRestExporter returns a RestExporter

func (*RestExporter) Unexport

func (re *RestExporter) Unexport()

Unexport unexport the RestExporter

type RestInvoker

type RestInvoker struct {
	protocol.BaseInvoker
	// contains filtered or unexported fields
}

nolint

func NewRestInvoker

func NewRestInvoker(url *common.URL, client *client.RestClient, restMethodConfig map[string]*config.RestMethodConfig) *RestInvoker

NewRestInvoker returns a RestInvoker

func (*RestInvoker) Invoke

func (ri *RestInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke is used to call service method by invocation

type RestProtocol

type RestProtocol struct {
	protocol.BaseProtocol
	// contains filtered or unexported fields
}

nolint

func NewRestProtocol

func NewRestProtocol() *RestProtocol

NewRestProtocol returns a RestProtocol

func (*RestProtocol) Destroy

func (rp *RestProtocol) Destroy()

Destroy destroy rest service

func (*RestProtocol) Export

func (rp *RestProtocol) Export(invoker protocol.Invoker) protocol.Exporter

Export export rest service

func (*RestProtocol) Refer

func (rp *RestProtocol) Refer(url *common.URL) protocol.Invoker

Refer create rest service reference

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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