xchg_samples

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server added in v0.2.2

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

func StartServer added in v0.2.2

func StartServer(privateKey *rsa.PrivateKey, accessKey string, processor func(function string, parameter []byte) (response []byte, err error)) *Server

func StartServerFast added in v0.2.2

func StartServerFast(accessKey string, processor func(function string, parameter []byte) (response []byte, err error)) *Server

func (*Server) Address added in v0.2.3

func (c *Server) Address() string

func (*Server) ServerProcessorAuth added in v0.2.2

func (c *Server) ServerProcessorAuth(authData []byte) (err error)

func (*Server) ServerProcessorCall added in v0.2.2

func (c *Server) ServerProcessorCall(authData []byte, function string, parameter []byte) (response []byte, err error)

func (*Server) Stop added in v0.2.2

func (c *Server) Stop()

type SimpleClient

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

func NewSimpleClient

func NewSimpleClient(address string) *SimpleClient

func (*SimpleClient) Calculate

func (c *SimpleClient) Calculate(a int, b int) (result int, err error)

func (*SimpleClient) Version

func (c *SimpleClient) Version() (result string, err error)

type SimpleServer

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

func NewSimpleServer

func NewSimpleServer(privateKey *rsa.PrivateKey) *SimpleServer

func (*SimpleServer) ServerProcessorAuth

func (c *SimpleServer) ServerProcessorAuth(authData []byte) (err error)

func (*SimpleServer) ServerProcessorCall

func (c *SimpleServer) ServerProcessorCall(authData []byte, function string, parameter []byte) (response []byte, err error)

func (*SimpleServer) Start

func (c *SimpleServer) Start()

func (*SimpleServer) Stop

func (c *SimpleServer) Stop()

Jump to

Keyboard shortcuts

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