package
1.3.9
Repository: https://github.com/qkbyte/go-zero.git
Documentation: pkg.go.dev

# Functions

AllowOriginPatterns lists the host patterns for authorized origins which is used for avoid same origin strategy.
ChanReceiveTimeout is the timeout for processing stream items from the client, after StreamBufferCapacity was reached If the hub method is not able to process a stream item during the timeout duration, the server will send a completion with error.
CtxPipe creates a synchronous in-memory pipe.
EnableDetailedErrors If true, detailed exception messages are returned to the other Party when an exception is thrown in a Hub method.
HandshakeTimeout is the interval if the other Party doesn't send an initial handshake message within, the connection is closed.
HTTPTransports sets the list of available transports for http connections.
HubFactory sets the function which returns the hub instance for every hub method invocation The function might create a new hub instance on every invocation.
InsecureSkipVerify disables Accepts origin verification behaviour which is used to avoid same origin strategy.
KeepAliveInterval is the interval if the Party hasn't sent a message within, a ping message is sent automatically to keep the connection open.
Logger sets the logger used by the Party to log info events.
MaximumReceiveMessageSize is the maximum size of a single incoming hub message.
NewClient builds a new Client.
NewConnectionBase creates a new ConnectionBase.
NewHTTPConnection creates a signalR HTTP Connection for usage with a Client.
NewNetConnection wraps net.Conn into a Connection.
NewServer creates a new server for one type of hub.
ReadWriteWithContext is a wrapper to make blocking io.Writer / io.Reader cancelable.
SetNewConnectionIdFunc is set connection function.
SimpleHubFactory sets a HubFactory which creates a new hub with the underlying type of hubProto on each hub method invocation.
StreamBufferCapacity is the maximum number of items that can be buffered for client upload streams.
TimeoutInterval is the interval one Party will consider the other Party disconnected if it hasn't received a message (including keep-alive) in it.
TransferFormat sets the transfer format used on the transport.
UseHub sets the hub instance used by the server.
WithConnection sets the Connection of the Client.
WithConnector allows the Client to establish a connection using the Connection build by the connectionFactory.
WithHTTPClient sets the http client used to connect to the signalR server.
WithHTTPHeaders sets the function for providing request headers for HTTP and websocket requests.
WithHTTPServeMux is a MappableRouter factory for MapHTTP which converts a http.ServeMux to a MappableRouter.
WithReceiver sets the object which will receive server side calls to client methods (e.g.

# Constants

BinaryTransferMode is for binary messages like MessagePack.
Client states ClientCreated The Client has been created and is not started yet.
Client states ClientCreated The Client has been created and is not started yet.
Client states ClientCreated The Client has been created and is not started yet.
Client states ClientCreated The Client has been created and is not started yet.
TextTransferMode is for UTF-8 encoded text messages like JSON.

# Variables

ErrClosedPipe is the error used for read or write operations on a closed pipe.
No description provided by the author

# Structs

ConnectionBase is a baseclass for implementers of the Connection interface.
Hub is a base class for hubs.
InvokeResult is the combined value/error result for async invocations.
A PipeReader is the read half of a pipe.
A PipeWriter is the write half of a pipe.
Receiver is a base class for receivers in the client.
RWJobResult can be used to send the result of an io.Writer / io.Reader operation over a channel.

# Interfaces

Client is the signalR connection used on the client side.
ClientProxy allows the hub to send messages to one or more of its clients.
Connection describes a connection between signalR client and server.
ConnectionWithTransferMode is a Connection with TransferMode (e.g.
Doer is the *http.Client interface.
GroupManager manages the client groups of the hub.
HubClients gives the hub access to various client groups All() gets a ClientProxy that can be used to invoke methods on all clients connected to the hub Caller() gets a ClientProxy that can be used to invoke methods of the current calling client Client() gets a ClientProxy that can be used to invoke methods on the specified client connection Group() gets a ClientProxy that can be used to invoke methods on all connections in the specified group.
HubContext is a context abstraction for a hub Clients gets a HubClients that can be used to invoke methods on clients connected to the hub Groups gets a GroupManager that can be used to add and remove connections to named groups Items holds key/value pairs scoped to the hubs connection ConnectionID gets the ID of the current connection Abort aborts the current connection Logger returns the logger used in this server.
HubInterface is a hubs interface.
HubLifetimeManager is a lifetime manager abstraction for hub instances OnConnected() is called when a connection is started OnDisconnected() is called when a connection is finished InvokeAll() sends an invocation message to all hub connections InvokeClient() sends an invocation message to a specified hub connection InvokeGroup() sends an invocation message to a specified group of hub connections AddToGroup() adds a connection to the specified group RemoveFromGroup() removes a connection from the specified group.
MappableRouter encapsulates the methods used by server.MapHTTP to configure the handlers required by the signalr protocol.
Party is the common base of Server and Client.
ReceiverInterface allows receivers to interact with the server directly from the receiver methods Init(Client) Init is used by the Client to connect the receiver to the server.
Server is a SignalR server for one type of hub.
StructuredLogger is the simplest logging interface for structured logging.

# Type aliases

ClientState is the state of the client.
TransferMode is either TextTransferMode or BinaryTransferMode.