fastrpc

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOOperator

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

func NewIOOperator

func NewIOOperator(stream *net.TCPConn, readLength uint64) *IOOperator

func (*IOOperator) ReadDataLeft

func (i *IOOperator) ReadDataLeft() uint64

func (*IOOperator) ReadIOStream

func (i *IOOperator) ReadIOStream(count int) ([]byte, error)

func (*IOOperator) WriteError

func (i *IOOperator) WriteError(message string) error

func (*IOOperator) WriteIOFromBuffer

func (i *IOOperator) WriteIOFromBuffer(buf []byte) error

func (*IOOperator) WriteIOFromReader

func (i *IOOperator) WriteIOFromReader(reader io.Reader, count int, chunkSize int) error

func (*IOOperator) WriteNothing

func (i *IOOperator) WriteNothing() error

type MasterCapabilities

type MasterCapabilities struct {
	Name              string `json:"name"`
	Description       string `json:"description"`
	IncomingEncoding  string `json:"incomingEncoding"`
	ReturningEncoding string `json:"returningEncoding"`
	// contains filtered or unexported fields
}

type MasterCapabilitiesDTO added in v0.0.7

type MasterCapabilitiesDTO struct {
	RpcID             uint32 `json:"rpcId"`
	Name              string `json:"name"`
	Description       string `json:"description"`
	IncomingEncoding  string `json:"incomingEncoding"`
	ReturningEncoding string `json:"returningEncoding"`
}

type RpcMaster

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

func NewMaster

func NewMaster() (*RpcMaster, error)

func (*RpcMaster) RegisterRPC

func (r *RpcMaster) RegisterRPC(name string, description string, incomingEncoding string, returningEncoding string,
	rpc func(*IOOperator) error)

func (*RpcMaster) RunRPC

func (r *RpcMaster) RunRPC(ctx context.Context, ip net.IP, port int) error

func (*RpcMaster) ShowCapabilities

func (r *RpcMaster) ShowCapabilities() ([]MasterCapabilitiesDTO, error)

type RpcSlave

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

func NewRpcSlave

func NewRpcSlave(masterIP net.IP, masterPort int, poolSize int) (*RpcSlave, error)

func (*RpcSlave) DeInitialize

func (r *RpcSlave) DeInitialize()

func (*RpcSlave) GetMasterCapabilities

func (r *RpcSlave) GetMasterCapabilities() ([]MasterCapabilitiesDTO, error)

Jump to

Keyboard shortcuts

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