Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenReturnStream ¶ added in v1.1.1032
func ListenReturnStream[T proto.Message, U proto.Message](con common.NatsConn, panicRecovery bool, subList *sync.Map, subject string, receiveAPIMiddleware []middleware.Receive, req T, fn func(ctx context.Context, req T, res chan<- U, errs chan<- error)) error
ListenReturnStream is a function that sets up a NATS subscription to handle streaming reply messages. It executes the provided function to process the request and send the response messages. The function runs in a separate goroutine that continuously listens for return messages and error messages, and publishes them to the reply inbox. the function exits when an error or cancellation occurs.
Types ¶
type Auth ¶ added in v1.1.1377
type Auth interface {
// contains filtered or unexported methods
}
Auth is a struct with various methods to provide authentication and authorisation capabilities for the api
type Endpoints ¶ added in v1.1.1131
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints provides API endpoints for SHAR
func New ¶
func New(operations workflow.Ops, nc *natz.NatsConnConfiguration, auth Auth, options *option.ServerOptions) (*Endpoints, error)
New creates a new instance of the SHAR API server
Click to show internal directories.
Click to hide internal directories.