gin

package
v1.9.12 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGinClientBackendFactory

func GetGinClientBackendFactory() backends.ClientBackendFactory

GetGinClientBackendFactory returns a gin client backend factory This function is used to avoid import cycles while allowing registration

Types

type GinClientBackend

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

GinClientBackend implements HTTP/REST client backend using Gin/Resty

func NewGinClientBackend

func NewGinClientBackend(config *backends.ClientConfig) (*GinClientBackend, error)

NewGinClientBackend creates a new Gin client backend

func (*GinClientBackend) CheckHealth

func (g *GinClientBackend) CheckHealth() error

CheckHealth checks the health of the server via HTTP

func (*GinClientBackend) Close

func (g *GinClientBackend) Close() error

Close closes the backend and cleans up idle connections

func (*GinClientBackend) EstablishRealtimeConn

func (g *GinClientBackend) EstablishRealtimeConn(jsonString string) (backends.RealtimeConnection, error)

EstablishRealtimeConn establishes a realtime connection using WebSocket

func (*GinClientBackend) SendMessage

func (g *GinClientBackend) SendMessage(method string, jsonString string, prvKey string, insecure bool, ctx context.Context) (string, error)

SendMessage sends an RPC message with authentication via HTTP

func (*GinClientBackend) SendRawMessage

func (g *GinClientBackend) SendRawMessage(jsonString string, insecure bool) (string, error)

SendRawMessage sends a raw JSON message via HTTP

type GinClientBackendFactory

type GinClientBackendFactory struct{}

GinClientBackendFactory creates gin client backends

func NewGinClientBackendFactory

func NewGinClientBackendFactory() *GinClientBackendFactory

NewGinClientBackendFactory creates a new gin client backend factory

func (*GinClientBackendFactory) CreateBackend

CreateBackend creates a new gin client backend

func (*GinClientBackendFactory) GetBackendType

GetBackendType returns the backend type this factory creates

type WebSocketRealtimeConnection

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

WebSocketRealtimeConnection wraps a WebSocket connection to implement RealtimeConnection

func NewWebSocketRealtimeConnection

func NewWebSocketRealtimeConnection(conn *websocket.Conn) *WebSocketRealtimeConnection

NewWebSocketRealtimeConnection creates a new WebSocket-based realtime connection

func (*WebSocketRealtimeConnection) Close

Close closes the WebSocket connection

func (*WebSocketRealtimeConnection) ReadMessage

func (w *WebSocketRealtimeConnection) ReadMessage() (messageType int, data []byte, err error)

ReadMessage reads a message from the WebSocket connection

func (*WebSocketRealtimeConnection) SetReadLimit

func (w *WebSocketRealtimeConnection) SetReadLimit(limit int64)

SetReadLimit sets the maximum size for incoming messages

func (*WebSocketRealtimeConnection) WriteMessage

func (w *WebSocketRealtimeConnection) WriteMessage(messageType int, data []byte) error

WriteMessage writes a message to the WebSocket connection

Jump to

Keyboard shortcuts

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