module

package
v0.0.0-...-3458964 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notice

type Notice interface {
	Info() model.PluginInfo
	Send(data []byte) model.JsonRes
}

Notice 通知服务插件接口

type NoticePlugin

type NoticePlugin struct{}

NoticePlugin 插件的虚拟实现。用于PluginMap的插件接口。在运行时,来自插件实现的实际实现会覆盖

func (NoticePlugin) Client

func (NoticePlugin) Client(b *gplugin.MuxBroker, c *rpc.Client) (interface{}, error)

Client 此方法由宿主进程调用

func (NoticePlugin) Server

func (NoticePlugin) Server(*gplugin.MuxBroker) (interface{}, error)

Server 此方法由插件进程延迟的调用

type NoticeRPC

type NoticeRPC struct {
	Client *rpc.Client
}

NoticeRPC 基于RPC实现

func (*NoticeRPC) Info

func (g *NoticeRPC) Info() model.PluginInfo

func (*NoticeRPC) Send

func (g *NoticeRPC) Send(data []byte) model.JsonRes

type NoticeRPCServer

type NoticeRPCServer struct {
	Impl Notice
}

NoticeRPCServer GreeterRPC的RPC服务器,符合 net/rpc的要求

func (*NoticeRPCServer) Info

func (s *NoticeRPCServer) Info(args interface{}, resp *model.PluginInfo) error

func (*NoticeRPCServer) Send

func (s *NoticeRPCServer) Send(data []byte, resp *model.JsonRes) error

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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