serverplugin

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFunctionName

func GetFunctionName(i interface{}) string

Types

type StaticRegisterPlugin

type StaticRegisterPlugin struct {
	ServiceAddress string
}

StaticRegisterPlugin implements static registry.

func (*StaticRegisterPlugin) Deregister

func (p *StaticRegisterPlugin) Deregister(name string) (err error)

Deregister 注销服务

func (*StaticRegisterPlugin) HandleConnAccept

func (p *StaticRegisterPlugin) HandleConnAccept(conn net.Conn) (net.Conn, bool)

HandleConnAccept handles connections from clients

func (*StaticRegisterPlugin) Register

func (p *StaticRegisterPlugin) Register(name string, rcvr interface{}, metadata string) (err error)

Register handles registering event. this service is registered at BASE/serviceName/thisIpAddress node

func (*StaticRegisterPlugin) Start

func (p *StaticRegisterPlugin) Start() error

Start starts to connect etcd cluster

type TracePlugin

type TracePlugin struct {
}

func (*TracePlugin) PostConnAccept

func (p *TracePlugin) PostConnAccept(conn net.Conn) (net.Conn, bool)

func (*TracePlugin) PostReadRequest

func (p *TracePlugin) PostReadRequest(ctx context.Context, r *protocol.Message, e error) error

func (*TracePlugin) PostWriteResponse

func (p *TracePlugin) PostWriteResponse(ctx context.Context, req *protocol.Message, res *protocol.Message, err error) error

func (*TracePlugin) Register

func (p *TracePlugin) Register(name string, rcvr interface{}, metadata string) error

func (*TracePlugin) RegisterFunction

func (p *TracePlugin) RegisterFunction(name string, fn interface{}, metadata string) error

Jump to

Keyboard shortcuts

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