example

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServerDemo

func NewHttpServerDemo(addr string)

Types

type Controller

type Controller func(request *simpleHttp.Request, response *simpleHttp.Response)

type HttpServerDemo

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

func (*HttpServerDemo) AddController

func (h *HttpServerDemo) AddController(path string, controller Controller)

func (*HttpServerDemo) Input

func (h *HttpServerDemo) Input(context *event.HandleContext, request *simpleHttp.Request) (any, bool)

func (*HttpServerDemo) Start

func (h *HttpServerDemo) Start()

type RpcClient added in v1.2.0

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

func NewRpcClient added in v1.2.0

func NewRpcClient(addr string) *RpcClient

func (*RpcClient) Call added in v1.2.0

func (r *RpcClient) Call(name string, args []byte) (result any)

func (*RpcClient) Input added in v1.2.0

func (r *RpcClient) Input(_ *event.HandleContext, message *simpleRpc.Message) (any, bool)

type RpcServer added in v1.2.0

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

func NewRpcServer added in v1.2.0

func NewRpcServer(addr string) *RpcServer

func (*RpcServer) Input added in v1.2.0

func (r *RpcServer) Input(context *event.HandleContext, message *simpleRpc.Message) (any, bool)

Input 请求入口

func (*RpcServer) Start added in v1.2.0

func (r *RpcServer) Start()

type Service added in v1.2.0

type Service func(args []byte) any

type SimpleHttpClient

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

func NewSimpleHttpClient

func NewSimpleHttpClient() *SimpleHttpClient

func (*SimpleHttpClient) Get added in v1.2.0

func (*SimpleHttpClient) Input

func (s *SimpleHttpClient) Input(_ *event.HandleContext, response *simpleHttp.Response) (any, bool)

Jump to

Keyboard shortcuts

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