Documentation
¶
Index ¶
- Variables
- func GetVersion() string
- func InitializeCryptoProvider()
- func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType
- func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer
- type BindingsAdapter
- func (_self *BindingsAdapter) Connect(config ClientConfig) (uint64, error)
- func (_self *BindingsAdapter) ConnectAsync(config ClientConfig) (uint64, error)
- func (_self *BindingsAdapter) CreateSession(config SessionConfig, destination Name) (*BindingsSessionContext, error)
- func (_self *BindingsAdapter) CreateSessionAsync(config SessionConfig, destination Name) (*BindingsSessionContext, error)
- func (_self *BindingsAdapter) DeleteSession(session *BindingsSessionContext) error
- func (_self *BindingsAdapter) DeleteSessionAsync(session *BindingsSessionContext) error
- func (object *BindingsAdapter) Destroy()
- func (_self *BindingsAdapter) Disconnect(connectionId uint64) error
- func (_self *BindingsAdapter) DisconnectAsync(connectionId uint64) error
- func (_self *BindingsAdapter) Id() uint64
- func (_self *BindingsAdapter) ListenForSession(timeoutMs *uint32) (*BindingsSessionContext, error)
- func (_self *BindingsAdapter) ListenForSessionAsync(timeoutMs *uint32) (*BindingsSessionContext, error)
- func (_self *BindingsAdapter) Name() Name
- func (_self *BindingsAdapter) RemoveRoute(name Name, connectionId uint64) error
- func (_self *BindingsAdapter) RemoveRouteAsync(name Name, connectionId uint64) error
- func (_self *BindingsAdapter) RunServer(config ServerConfig) error
- func (_self *BindingsAdapter) RunServerAsync(config ServerConfig) error
- func (_self *BindingsAdapter) SetRoute(name Name, connectionId uint64) error
- func (_self *BindingsAdapter) SetRouteAsync(name Name, connectionId uint64) error
- func (_self *BindingsAdapter) StopServer(endpoint string) error
- func (_self *BindingsAdapter) Subscribe(name Name, connectionId *uint64) error
- func (_self *BindingsAdapter) SubscribeAsync(name Name, connectionId *uint64) error
- func (_self *BindingsAdapter) Unsubscribe(name Name, connectionId *uint64) error
- func (_self *BindingsAdapter) UnsubscribeAsync(name Name, connectionId *uint64) error
- type BindingsAdapterInterface
- type BindingsSessionContext
- func (_self *BindingsSessionContext) Destination() (Name, error)
- func (object *BindingsSessionContext) Destroy()
- func (_self *BindingsSessionContext) GetMessage(timeoutMs *uint32) (ReceivedMessage, error)
- func (_self *BindingsSessionContext) GetMessageAsync(timeoutMs *uint32) (ReceivedMessage, error)
- func (_self *BindingsSessionContext) Invite(participant Name) error
- func (_self *BindingsSessionContext) InviteAsync(participant Name) error
- func (_self *BindingsSessionContext) IsInitiator() (bool, error)
- func (_self *BindingsSessionContext) Publish(data []byte, payloadType *string, metadata *map[string]string) error
- func (_self *BindingsSessionContext) PublishAsync(data []byte, payloadType *string, metadata *map[string]string) error
- func (_self *BindingsSessionContext) PublishTo(messageContext MessageContext, data []byte, payloadType *string, ...) error
- func (_self *BindingsSessionContext) PublishToAsync(messageContext MessageContext, data []byte, payloadType *string, ...) error
- func (_self *BindingsSessionContext) PublishToWithCompletion(messageContext MessageContext, data []byte, payloadType *string, ...) (*FfiCompletionHandle, error)
- func (_self *BindingsSessionContext) PublishToWithCompletionAsync(messageContext MessageContext, data []byte, payloadType *string, ...) (*FfiCompletionHandle, error)
- func (_self *BindingsSessionContext) PublishWithCompletion(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
- func (_self *BindingsSessionContext) PublishWithCompletionAsync(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
- func (_self *BindingsSessionContext) PublishWithParams(destination Name, fanout uint32, data []byte, connectionOut *uint64, ...) error
- func (_self *BindingsSessionContext) PublishWithParamsAsync(destination Name, fanout uint32, data []byte, connectionOut *uint64, ...) error
- func (_self *BindingsSessionContext) Remove(participant Name) error
- func (_self *BindingsSessionContext) RemoveAsync(participant Name) error
- func (_self *BindingsSessionContext) SessionId() (uint32, error)
- func (_self *BindingsSessionContext) SessionType() (SessionType, error)
- func (_self *BindingsSessionContext) Source() (Name, error)
- type BindingsSessionContextInterface
- type BufLifter
- type BufLowerer
- type BufReader
- type BufWriter
- type BuildInfo
- type ClientConfig
- type FfiCompletionHandle
- type FfiCompletionHandleInterface
- type FfiConverterBindingsAdapter
- func (c FfiConverterBindingsAdapter) Lift(pointer unsafe.Pointer) *BindingsAdapter
- func (c FfiConverterBindingsAdapter) Lower(value *BindingsAdapter) unsafe.Pointer
- func (c FfiConverterBindingsAdapter) Read(reader io.Reader) *BindingsAdapter
- func (c FfiConverterBindingsAdapter) Write(writer io.Writer, value *BindingsAdapter)
- type FfiConverterBindingsSessionContext
- func (c FfiConverterBindingsSessionContext) Lift(pointer unsafe.Pointer) *BindingsSessionContext
- func (c FfiConverterBindingsSessionContext) Lower(value *BindingsSessionContext) unsafe.Pointer
- func (c FfiConverterBindingsSessionContext) Read(reader io.Reader) *BindingsSessionContext
- func (c FfiConverterBindingsSessionContext) Write(writer io.Writer, value *BindingsSessionContext)
- type FfiConverterBool
- type FfiConverterBuildInfo
- type FfiConverterBytes
- type FfiConverterClientConfig
- type FfiConverterDuration
- type FfiConverterFfiCompletionHandle
- func (c FfiConverterFfiCompletionHandle) Lift(pointer unsafe.Pointer) *FfiCompletionHandle
- func (c FfiConverterFfiCompletionHandle) Lower(value *FfiCompletionHandle) unsafe.Pointer
- func (c FfiConverterFfiCompletionHandle) Read(reader io.Reader) *FfiCompletionHandle
- func (c FfiConverterFfiCompletionHandle) Write(writer io.Writer, value *FfiCompletionHandle)
- type FfiConverterMapStringString
- func (c FfiConverterMapStringString) Lift(rb RustBufferI) map[string]string
- func (c FfiConverterMapStringString) Lower(value map[string]string) C.RustBuffer
- func (_ FfiConverterMapStringString) Read(reader io.Reader) map[string]string
- func (_ FfiConverterMapStringString) Write(writer io.Writer, mapValue map[string]string)
- type FfiConverterMessageContext
- func (c FfiConverterMessageContext) Lift(rb RustBufferI) MessageContext
- func (c FfiConverterMessageContext) Lower(value MessageContext) C.RustBuffer
- func (c FfiConverterMessageContext) Read(reader io.Reader) MessageContext
- func (c FfiConverterMessageContext) Write(writer io.Writer, value MessageContext)
- type FfiConverterName
- type FfiConverterOptionalBool
- type FfiConverterOptionalMapStringString
- func (c FfiConverterOptionalMapStringString) Lift(rb RustBufferI) *map[string]string
- func (c FfiConverterOptionalMapStringString) Lower(value *map[string]string) C.RustBuffer
- func (_ FfiConverterOptionalMapStringString) Read(reader io.Reader) *map[string]string
- func (_ FfiConverterOptionalMapStringString) Write(writer io.Writer, value *map[string]string)
- type FfiConverterOptionalName
- type FfiConverterOptionalString
- type FfiConverterOptionalUint32
- type FfiConverterOptionalUint64
- type FfiConverterReceivedMessage
- func (c FfiConverterReceivedMessage) Lift(rb RustBufferI) ReceivedMessage
- func (c FfiConverterReceivedMessage) Lower(value ReceivedMessage) C.RustBuffer
- func (c FfiConverterReceivedMessage) Read(reader io.Reader) ReceivedMessage
- func (c FfiConverterReceivedMessage) Write(writer io.Writer, value ReceivedMessage)
- type FfiConverterSequenceString
- type FfiConverterServerConfig
- type FfiConverterSessionConfig
- type FfiConverterSessionType
- type FfiConverterSlimError
- type FfiConverterString
- type FfiConverterTlsConfig
- type FfiConverterUint32
- type FfiConverterUint64
- type FfiDestroyerBindingsAdapter
- type FfiDestroyerBindingsSessionContext
- type FfiDestroyerBool
- type FfiDestroyerBuildInfo
- type FfiDestroyerBytes
- type FfiDestroyerClientConfig
- type FfiDestroyerDuration
- type FfiDestroyerFfiCompletionHandle
- type FfiDestroyerMapStringString
- type FfiDestroyerMessageContext
- type FfiDestroyerName
- type FfiDestroyerOptionalBool
- type FfiDestroyerOptionalMapStringString
- type FfiDestroyerOptionalName
- type FfiDestroyerOptionalString
- type FfiDestroyerOptionalUint32
- type FfiDestroyerOptionalUint64
- type FfiDestroyerReceivedMessage
- type FfiDestroyerSequenceString
- type FfiDestroyerServerConfig
- type FfiDestroyerSessionConfig
- type FfiDestroyerSessionType
- type FfiDestroyerSlimError
- type FfiDestroyerString
- type FfiDestroyerTlsConfig
- type FfiDestroyerUint32
- type FfiDestroyerUint64
- type FfiObject
- type GoRustBuffer
- type MessageContext
- type Name
- type NativeError
- type ReceivedMessage
- type RustBufferI
- type ServerConfig
- type SessionConfig
- type SessionType
- type SlimError
- func NewSlimErrorAuthError(message string) *SlimError
- func NewSlimErrorInternalError(message string) *SlimError
- func NewSlimErrorInvalidArgument(message string) *SlimError
- func NewSlimErrorReceiveError(message string) *SlimError
- func NewSlimErrorSendError(message string) *SlimError
- func NewSlimErrorServiceError(message string) *SlimError
- func NewSlimErrorSessionError(message string) *SlimError
- func NewSlimErrorTimeout() *SlimError
- type SlimErrorAuthError
- type SlimErrorInternalError
- type SlimErrorInvalidArgument
- type SlimErrorReceiveError
- type SlimErrorSendError
- type SlimErrorServiceError
- type SlimErrorSessionError
- type SlimErrorTimeout
- type TlsConfig
Constants ¶
This section is empty.
Variables ¶
var ErrSlimErrorAuthError = fmt.Errorf("SlimErrorAuthError")
var ErrSlimErrorInternalError = fmt.Errorf("SlimErrorInternalError")
var ErrSlimErrorInvalidArgument = fmt.Errorf("SlimErrorInvalidArgument")
var ErrSlimErrorReceiveError = fmt.Errorf("SlimErrorReceiveError")
var ErrSlimErrorSendError = fmt.Errorf("SlimErrorSendError")
var ErrSlimErrorServiceError = fmt.Errorf("SlimErrorServiceError")
Err* are used for checking error type with `errors.Is`
var ErrSlimErrorSessionError = fmt.Errorf("SlimErrorSessionError")
var ErrSlimErrorTimeout = fmt.Errorf("SlimErrorTimeout")
var FfiConverterBindingsAdapterINSTANCE = FfiConverterBindingsAdapter{}
var FfiConverterBindingsSessionContextINSTANCE = FfiConverterBindingsSessionContext{}
var FfiConverterBoolINSTANCE = FfiConverterBool{}
var FfiConverterBuildInfoINSTANCE = FfiConverterBuildInfo{}
var FfiConverterBytesINSTANCE = FfiConverterBytes{}
var FfiConverterClientConfigINSTANCE = FfiConverterClientConfig{}
var FfiConverterDurationINSTANCE = FfiConverterDuration{}
var FfiConverterFfiCompletionHandleINSTANCE = FfiConverterFfiCompletionHandle{}
var FfiConverterMapStringStringINSTANCE = FfiConverterMapStringString{}
var FfiConverterMessageContextINSTANCE = FfiConverterMessageContext{}
var FfiConverterNameINSTANCE = FfiConverterName{}
var FfiConverterOptionalBoolINSTANCE = FfiConverterOptionalBool{}
var FfiConverterOptionalMapStringStringINSTANCE = FfiConverterOptionalMapStringString{}
var FfiConverterOptionalNameINSTANCE = FfiConverterOptionalName{}
var FfiConverterOptionalStringINSTANCE = FfiConverterOptionalString{}
var FfiConverterOptionalUint32INSTANCE = FfiConverterOptionalUint32{}
var FfiConverterOptionalUint64INSTANCE = FfiConverterOptionalUint64{}
var FfiConverterReceivedMessageINSTANCE = FfiConverterReceivedMessage{}
var FfiConverterSequenceStringINSTANCE = FfiConverterSequenceString{}
var FfiConverterServerConfigINSTANCE = FfiConverterServerConfig{}
var FfiConverterSessionConfigINSTANCE = FfiConverterSessionConfig{}
var FfiConverterSessionTypeINSTANCE = FfiConverterSessionType{}
var FfiConverterSlimErrorINSTANCE = FfiConverterSlimError{}
var FfiConverterStringINSTANCE = FfiConverterString{}
var FfiConverterTlsConfigINSTANCE = FfiConverterTlsConfig{}
var FfiConverterUint32INSTANCE = FfiConverterUint32{}
var FfiConverterUint64INSTANCE = FfiConverterUint64{}
Functions ¶
func InitializeCryptoProvider ¶
func InitializeCryptoProvider()
Initialize the crypto provider
This must be called before any TLS operations. It's safe to call multiple times.
func LiftFromRustBuffer ¶
func LiftFromRustBuffer[GoType any](bufReader BufReader[GoType], rbuf RustBufferI) GoType
func LowerIntoRustBuffer ¶
func LowerIntoRustBuffer[GoType any](bufWriter BufWriter[GoType], value GoType) C.RustBuffer
Types ¶
type BindingsAdapter ¶
type BindingsAdapter struct {
// contains filtered or unexported fields
}
Adapter that bridges the App API with language-bindings interface
This adapter uses enum-based auth types (`AuthProvider`/`AuthVerifier`) instead of generics to be compatible with UniFFI, supporting multiple authentication mechanisms (SharedSecret, JWT, SPIRE, StaticToken). It provides both synchronous (blocking) and asynchronous methods for flexibility.
func CreateAppWithSecret ¶
func CreateAppWithSecret(appName Name, sharedSecret string) (*BindingsAdapter, error)
Create an app with the given name and shared secret (blocking version for FFI)
This is the main entry point for creating a SLIM application from language bindings.
func (*BindingsAdapter) Connect ¶
func (_self *BindingsAdapter) Connect(config ClientConfig) (uint64, error)
Connect to a SLIM server as a client (blocking version for FFI)
# Arguments * `config` - Client configuration (endpoint and TLS settings)
# Returns * `Ok(connection_id)` - Connected successfully, returns the connection ID * `Err(SlimError)` - If connection fails
func (*BindingsAdapter) ConnectAsync ¶
func (_self *BindingsAdapter) ConnectAsync(config ClientConfig) (uint64, error)
Connect to a SLIM server (async version)
Note: Automatically subscribes to the app's own name after connecting to enable receiving inbound messages and sessions.
func (*BindingsAdapter) CreateSession ¶
func (_self *BindingsAdapter) CreateSession(config SessionConfig, destination Name) (*BindingsSessionContext, error)
Create a new session (blocking version for FFI)
func (*BindingsAdapter) CreateSessionAsync ¶
func (_self *BindingsAdapter) CreateSessionAsync(config SessionConfig, destination Name) (*BindingsSessionContext, error)
Create a new session (async version)
**Auto-waits for session establishment:** This method automatically waits for the session handshake to complete before returning. For point-to-point sessions, this ensures the remote peer has acknowledged the session. For multicast sessions, this ensures the initial setup is complete.
func (*BindingsAdapter) DeleteSession ¶
func (_self *BindingsAdapter) DeleteSession(session *BindingsSessionContext) error
Delete a session (blocking version for FFI)
func (*BindingsAdapter) DeleteSessionAsync ¶
func (_self *BindingsAdapter) DeleteSessionAsync(session *BindingsSessionContext) error
Delete a session (async version)
func (*BindingsAdapter) Destroy ¶
func (object *BindingsAdapter) Destroy()
func (*BindingsAdapter) Disconnect ¶
func (_self *BindingsAdapter) Disconnect(connectionId uint64) error
Disconnect from a SLIM server (blocking version for FFI)
# Arguments * `connection_id` - The connection ID returned from `connect()`
# Returns * `Ok(())` - Disconnected successfully * `Err(SlimError)` - If disconnection fails
func (*BindingsAdapter) DisconnectAsync ¶
func (_self *BindingsAdapter) DisconnectAsync(connectionId uint64) error
Disconnect from a SLIM server (async version)
func (*BindingsAdapter) Id ¶
func (_self *BindingsAdapter) Id() uint64
Get the app ID (derived from name)
func (*BindingsAdapter) ListenForSession ¶
func (_self *BindingsAdapter) ListenForSession(timeoutMs *uint32) (*BindingsSessionContext, error)
Listen for incoming sessions (blocking version for FFI)
func (*BindingsAdapter) ListenForSessionAsync ¶
func (_self *BindingsAdapter) ListenForSessionAsync(timeoutMs *uint32) (*BindingsSessionContext, error)
Listen for incoming sessions (async version)
func (*BindingsAdapter) RemoveRoute ¶
func (_self *BindingsAdapter) RemoveRoute(name Name, connectionId uint64) error
Remove a route (blocking version for FFI)
func (*BindingsAdapter) RemoveRouteAsync ¶
func (_self *BindingsAdapter) RemoveRouteAsync(name Name, connectionId uint64) error
Remove a route (async version)
func (*BindingsAdapter) RunServer ¶
func (_self *BindingsAdapter) RunServer(config ServerConfig) error
Run a SLIM server on the specified endpoint (blocking version for FFI)
# Arguments * `config` - Server configuration (endpoint and TLS settings)
# Returns * `Ok(())` - Server started successfully * `Err(SlimError)` - If server startup fails
func (*BindingsAdapter) RunServerAsync ¶
func (_self *BindingsAdapter) RunServerAsync(config ServerConfig) error
Run a SLIM server (async version)
func (*BindingsAdapter) SetRoute ¶
func (_self *BindingsAdapter) SetRoute(name Name, connectionId uint64) error
Set a route to a name for a specific connection (blocking version for FFI)
func (*BindingsAdapter) SetRouteAsync ¶
func (_self *BindingsAdapter) SetRouteAsync(name Name, connectionId uint64) error
Set a route to a name for a specific connection (async version)
func (*BindingsAdapter) StopServer ¶
func (_self *BindingsAdapter) StopServer(endpoint string) error
Stop a running SLIM server (blocking version for FFI)
# Arguments * `endpoint` - The endpoint address of the server to stop (e.g., "127.0.0.1:12345")
# Returns * `Ok(())` - Server stopped successfully * `Err(SlimError)` - If server not found or stop fails
func (*BindingsAdapter) Subscribe ¶
func (_self *BindingsAdapter) Subscribe(name Name, connectionId *uint64) error
Subscribe to a name (blocking version for FFI)
func (*BindingsAdapter) SubscribeAsync ¶
func (_self *BindingsAdapter) SubscribeAsync(name Name, connectionId *uint64) error
Subscribe to a name (async version)
func (*BindingsAdapter) Unsubscribe ¶
func (_self *BindingsAdapter) Unsubscribe(name Name, connectionId *uint64) error
Unsubscribe from a name (blocking version for FFI)
func (*BindingsAdapter) UnsubscribeAsync ¶
func (_self *BindingsAdapter) UnsubscribeAsync(name Name, connectionId *uint64) error
Unsubscribe from a name (async version)
type BindingsAdapterInterface ¶
type BindingsAdapterInterface interface {
// Connect to a SLIM server as a client (blocking version for FFI)
//
// # Arguments
// * `config` - Client configuration (endpoint and TLS settings)
//
// # Returns
// * `Ok(connection_id)` - Connected successfully, returns the connection ID
// * `Err(SlimError)` - If connection fails
Connect(config ClientConfig) (uint64, error)
// Connect to a SLIM server (async version)
//
// Note: Automatically subscribes to the app's own name after connecting
// to enable receiving inbound messages and sessions.
ConnectAsync(config ClientConfig) (uint64, error)
// Create a new session (blocking version for FFI)
CreateSession(config SessionConfig, destination Name) (*BindingsSessionContext, error)
// Create a new session (async version)
//
// **Auto-waits for session establishment:** This method automatically waits for the
// session handshake to complete before returning. For point-to-point sessions, this
// ensures the remote peer has acknowledged the session. For multicast sessions, this
// ensures the initial setup is complete.
CreateSessionAsync(config SessionConfig, destination Name) (*BindingsSessionContext, error)
// Delete a session (blocking version for FFI)
DeleteSession(session *BindingsSessionContext) error
// Delete a session (async version)
DeleteSessionAsync(session *BindingsSessionContext) error
// Disconnect from a SLIM server (blocking version for FFI)
//
// # Arguments
// * `connection_id` - The connection ID returned from `connect()`
//
// # Returns
// * `Ok(())` - Disconnected successfully
// * `Err(SlimError)` - If disconnection fails
Disconnect(connectionId uint64) error
// Disconnect from a SLIM server (async version)
DisconnectAsync(connectionId uint64) error
// Get the app ID (derived from name)
Id() uint64
// Listen for incoming sessions (blocking version for FFI)
ListenForSession(timeoutMs *uint32) (*BindingsSessionContext, error)
// Listen for incoming sessions (async version)
ListenForSessionAsync(timeoutMs *uint32) (*BindingsSessionContext, error)
// Get the app name
Name() Name
// Remove a route (blocking version for FFI)
RemoveRoute(name Name, connectionId uint64) error
// Remove a route (async version)
RemoveRouteAsync(name Name, connectionId uint64) error
// Run a SLIM server on the specified endpoint (blocking version for FFI)
//
// # Arguments
// * `config` - Server configuration (endpoint and TLS settings)
//
// # Returns
// * `Ok(())` - Server started successfully
// * `Err(SlimError)` - If server startup fails
RunServer(config ServerConfig) error
// Run a SLIM server (async version)
RunServerAsync(config ServerConfig) error
// Set a route to a name for a specific connection (blocking version for FFI)
SetRoute(name Name, connectionId uint64) error
// Set a route to a name for a specific connection (async version)
SetRouteAsync(name Name, connectionId uint64) error
// Stop a running SLIM server (blocking version for FFI)
//
// # Arguments
// * `endpoint` - The endpoint address of the server to stop (e.g., "127.0.0.1:12345")
//
// # Returns
// * `Ok(())` - Server stopped successfully
// * `Err(SlimError)` - If server not found or stop fails
StopServer(endpoint string) error
// Subscribe to a name (blocking version for FFI)
Subscribe(name Name, connectionId *uint64) error
// Subscribe to a name (async version)
SubscribeAsync(name Name, connectionId *uint64) error
// Unsubscribe from a name (blocking version for FFI)
Unsubscribe(name Name, connectionId *uint64) error
// Unsubscribe from a name (async version)
UnsubscribeAsync(name Name, connectionId *uint64) error
}
Adapter that bridges the App API with language-bindings interface
This adapter uses enum-based auth types (`AuthProvider`/`AuthVerifier`) instead of generics to be compatible with UniFFI, supporting multiple authentication mechanisms (SharedSecret, JWT, SPIRE, StaticToken). It provides both synchronous (blocking) and asynchronous methods for flexibility.
type BindingsSessionContext ¶
type BindingsSessionContext struct {
// contains filtered or unexported fields
}
Session context for language bindings (UniFFI-compatible)
Wraps the session context with proper async access patterns for message reception. Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
func (*BindingsSessionContext) Destination ¶
func (_self *BindingsSessionContext) Destination() (Name, error)
Get the destination name for this session
func (*BindingsSessionContext) Destroy ¶
func (object *BindingsSessionContext) Destroy()
func (*BindingsSessionContext) GetMessage ¶
func (_self *BindingsSessionContext) GetMessage(timeoutMs *uint32) (ReceivedMessage, error)
Receive a message from the session (blocking version for FFI)
# Arguments * `timeout_ms` - Optional timeout in milliseconds
# Returns * `Ok(ReceivedMessage)` - Message with context and payload bytes * `Err(SlimError)` - If the receive fails or times out
func (*BindingsSessionContext) GetMessageAsync ¶
func (_self *BindingsSessionContext) GetMessageAsync(timeoutMs *uint32) (ReceivedMessage, error)
Receive a message from the session (async version)
func (*BindingsSessionContext) Invite ¶
func (_self *BindingsSessionContext) Invite(participant Name) error
Invite a participant to the session (blocking version for FFI)
**Auto-waits for completion:** This method automatically waits for the invitation to be sent and acknowledged before returning.
func (*BindingsSessionContext) InviteAsync ¶
func (_self *BindingsSessionContext) InviteAsync(participant Name) error
Invite a participant to the session (async version)
**Auto-waits for completion:** This method automatically waits for the invitation to be sent and acknowledged before returning.
func (*BindingsSessionContext) IsInitiator ¶
func (_self *BindingsSessionContext) IsInitiator() (bool, error)
Check if this session is the initiator
func (*BindingsSessionContext) Publish ¶
func (_self *BindingsSessionContext) Publish(data []byte, payloadType *string, metadata *map[string]string) error
Publish a message to the session's destination (fire-and-forget, blocking version)
This is the simple "fire-and-forget" API that most users want. The message is queued for sending and this method returns immediately without waiting for delivery confirmation.
**When to use:** Most common use case where you don't need delivery confirmation.
**When not to use:** If you need to ensure the message was delivered, use `publish_with_completion()` instead.
# Arguments * `data` - The message payload bytes * `payload_type` - Optional content type identifier * `metadata` - Optional key-value metadata pairs
# Returns * `Ok(())` - Message queued successfully * `Err(SlimError)` - If publishing fails
func (*BindingsSessionContext) PublishAsync ¶
func (_self *BindingsSessionContext) PublishAsync(data []byte, payloadType *string, metadata *map[string]string) error
Publish a message to the session's destination (fire-and-forget, async version)
func (*BindingsSessionContext) PublishTo ¶
func (_self *BindingsSessionContext) PublishTo(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) error
Publish a reply message to the originator of a received message (blocking version for FFI)
This method uses the routing information from a previously received message to send a reply back to the sender. This is the preferred way to implement request/reply patterns.
# Arguments * `message_context` - Context from a message received via `get_message()` * `data` - The reply payload bytes * `payload_type` - Optional content type identifier * `metadata` - Optional key-value metadata pairs
# Returns * `Ok(())` on success * `Err(SlimError)` if publishing fails
func (*BindingsSessionContext) PublishToAsync ¶
func (_self *BindingsSessionContext) PublishToAsync(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) error
Publish a reply message (fire-and-forget, async version)
func (*BindingsSessionContext) PublishToWithCompletion ¶
func (_self *BindingsSessionContext) PublishToWithCompletion(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
Publish a reply message with delivery confirmation (blocking version)
Similar to `publish_with_completion()` but for reply messages. Returns a completion handle to await delivery confirmation.
# Arguments * `message_context` - Context from a message received via `get_message()` * `data` - The reply payload bytes * `payload_type` - Optional content type identifier * `metadata` - Optional key-value metadata pairs
# Returns * `Ok(FfiCompletionHandle)` - Handle to await delivery confirmation * `Err(SlimError)` - If publishing fails
func (*BindingsSessionContext) PublishToWithCompletionAsync ¶
func (_self *BindingsSessionContext) PublishToWithCompletionAsync(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
Publish a reply message with delivery confirmation (async version)
func (*BindingsSessionContext) PublishWithCompletion ¶
func (_self *BindingsSessionContext) PublishWithCompletion(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
Publish a message with delivery confirmation (blocking version)
This variant returns a `FfiCompletionHandle` that can be awaited to ensure the message was delivered successfully. Use this when you need reliable delivery confirmation.
**When to use:** Critical messages where you need delivery confirmation.
# Arguments * `data` - The message payload bytes * `payload_type` - Optional content type identifier * `metadata` - Optional key-value metadata pairs
# Returns * `Ok(FfiCompletionHandle)` - Handle to await delivery confirmation * `Err(SlimError)` - If publishing fails
# Example ```ignore let completion = session.publish_with_completion(data, None, None)?; completion.wait()?; // Blocks until message is delivered ```
func (*BindingsSessionContext) PublishWithCompletionAsync ¶
func (_self *BindingsSessionContext) PublishWithCompletionAsync(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
Publish a message with delivery confirmation (async version)
func (*BindingsSessionContext) PublishWithParams ¶
func (_self *BindingsSessionContext) PublishWithParams(destination Name, fanout uint32, data []byte, connectionOut *uint64, payloadType *string, metadata *map[string]string) error
Low-level publish with full control over all parameters (blocking version for FFI)
This is an advanced method that provides complete control over routing and delivery. Most users should use `publish()` or `publish_to()` instead.
# Arguments * `destination` - Target name to send to * `fanout` - Number of copies to send (for multicast) * `data` - The message payload bytes * `connection_out` - Optional specific connection ID to use * `payload_type` - Optional content type identifier * `metadata` - Optional key-value metadata pairs
func (*BindingsSessionContext) PublishWithParamsAsync ¶
func (_self *BindingsSessionContext) PublishWithParamsAsync(destination Name, fanout uint32, data []byte, connectionOut *uint64, payloadType *string, metadata *map[string]string) error
Low-level publish with full control (async version)
func (*BindingsSessionContext) Remove ¶
func (_self *BindingsSessionContext) Remove(participant Name) error
Remove a participant from the session (blocking version for FFI)
**Auto-waits for completion:** This method automatically waits for the removal to be processed and acknowledged before returning.
func (*BindingsSessionContext) RemoveAsync ¶
func (_self *BindingsSessionContext) RemoveAsync(participant Name) error
Remove a participant from the session (async version)
**Auto-waits for completion:** This method automatically waits for the removal to be processed and acknowledged before returning.
func (*BindingsSessionContext) SessionId ¶
func (_self *BindingsSessionContext) SessionId() (uint32, error)
Get the session ID
func (*BindingsSessionContext) SessionType ¶
func (_self *BindingsSessionContext) SessionType() (SessionType, error)
Get the session type (PointToPoint or Group)
func (*BindingsSessionContext) Source ¶
func (_self *BindingsSessionContext) Source() (Name, error)
Get the source name for this session
type BindingsSessionContextInterface ¶
type BindingsSessionContextInterface interface {
// Get the destination name for this session
Destination() (Name, error)
// Receive a message from the session (blocking version for FFI)
//
// # Arguments
// * `timeout_ms` - Optional timeout in milliseconds
//
// # Returns
// * `Ok(ReceivedMessage)` - Message with context and payload bytes
// * `Err(SlimError)` - If the receive fails or times out
GetMessage(timeoutMs *uint32) (ReceivedMessage, error)
// Receive a message from the session (async version)
GetMessageAsync(timeoutMs *uint32) (ReceivedMessage, error)
// Invite a participant to the session (blocking version for FFI)
//
// **Auto-waits for completion:** This method automatically waits for the
// invitation to be sent and acknowledged before returning.
Invite(participant Name) error
// Invite a participant to the session (async version)
//
// **Auto-waits for completion:** This method automatically waits for the
// invitation to be sent and acknowledged before returning.
InviteAsync(participant Name) error
// Check if this session is the initiator
IsInitiator() (bool, error)
// Publish a message to the session's destination (fire-and-forget, blocking version)
//
// This is the simple "fire-and-forget" API that most users want.
// The message is queued for sending and this method returns immediately without
// waiting for delivery confirmation.
//
// **When to use:** Most common use case where you don't need delivery confirmation.
//
// **When not to use:** If you need to ensure the message was delivered, use
// `publish_with_completion()` instead.
//
// # Arguments
// * `data` - The message payload bytes
// * `payload_type` - Optional content type identifier
// * `metadata` - Optional key-value metadata pairs
//
// # Returns
// * `Ok(())` - Message queued successfully
// * `Err(SlimError)` - If publishing fails
Publish(data []byte, payloadType *string, metadata *map[string]string) error
// Publish a message to the session's destination (fire-and-forget, async version)
PublishAsync(data []byte, payloadType *string, metadata *map[string]string) error
// Publish a reply message to the originator of a received message (blocking version for FFI)
//
// This method uses the routing information from a previously received message
// to send a reply back to the sender. This is the preferred way to implement
// request/reply patterns.
//
// # Arguments
// * `message_context` - Context from a message received via `get_message()`
// * `data` - The reply payload bytes
// * `payload_type` - Optional content type identifier
// * `metadata` - Optional key-value metadata pairs
//
// # Returns
// * `Ok(())` on success
// * `Err(SlimError)` if publishing fails
PublishTo(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) error
// Publish a reply message (fire-and-forget, async version)
PublishToAsync(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) error
// Publish a reply message with delivery confirmation (blocking version)
//
// Similar to `publish_with_completion()` but for reply messages.
// Returns a completion handle to await delivery confirmation.
//
// # Arguments
// * `message_context` - Context from a message received via `get_message()`
// * `data` - The reply payload bytes
// * `payload_type` - Optional content type identifier
// * `metadata` - Optional key-value metadata pairs
//
// # Returns
// * `Ok(FfiCompletionHandle)` - Handle to await delivery confirmation
// * `Err(SlimError)` - If publishing fails
PublishToWithCompletion(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
// Publish a reply message with delivery confirmation (async version)
PublishToWithCompletionAsync(messageContext MessageContext, data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
// Publish a message with delivery confirmation (blocking version)
//
// This variant returns a `FfiCompletionHandle` that can be awaited to ensure
// the message was delivered successfully. Use this when you need reliable
// delivery confirmation.
//
// **When to use:** Critical messages where you need delivery confirmation.
//
// # Arguments
// * `data` - The message payload bytes
// * `payload_type` - Optional content type identifier
// * `metadata` - Optional key-value metadata pairs
//
// # Returns
// * `Ok(FfiCompletionHandle)` - Handle to await delivery confirmation
// * `Err(SlimError)` - If publishing fails
//
// # Example
// “`ignore
// let completion = session.publish_with_completion(data, None, None)?;
// completion.wait()?; // Blocks until message is delivered
// “`
PublishWithCompletion(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
// Publish a message with delivery confirmation (async version)
PublishWithCompletionAsync(data []byte, payloadType *string, metadata *map[string]string) (*FfiCompletionHandle, error)
// Low-level publish with full control over all parameters (blocking version for FFI)
//
// This is an advanced method that provides complete control over routing and delivery.
// Most users should use `publish()` or `publish_to()` instead.
//
// # Arguments
// * `destination` - Target name to send to
// * `fanout` - Number of copies to send (for multicast)
// * `data` - The message payload bytes
// * `connection_out` - Optional specific connection ID to use
// * `payload_type` - Optional content type identifier
// * `metadata` - Optional key-value metadata pairs
PublishWithParams(destination Name, fanout uint32, data []byte, connectionOut *uint64, payloadType *string, metadata *map[string]string) error
// Low-level publish with full control (async version)
PublishWithParamsAsync(destination Name, fanout uint32, data []byte, connectionOut *uint64, payloadType *string, metadata *map[string]string) error
// Remove a participant from the session (blocking version for FFI)
//
// **Auto-waits for completion:** This method automatically waits for the
// removal to be processed and acknowledged before returning.
Remove(participant Name) error
// Remove a participant from the session (async version)
//
// **Auto-waits for completion:** This method automatically waits for the
// removal to be processed and acknowledged before returning.
RemoveAsync(participant Name) error
// Get the session ID
SessionId() (uint32, error)
// Get the session type (PointToPoint or Group)
SessionType() (SessionType, error)
// Get the source name for this session
Source() (Name, error)
}
Session context for language bindings (UniFFI-compatible)
Wraps the session context with proper async access patterns for message reception. Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
type BufLifter ¶
type BufLifter[GoType any] interface { Lift(value RustBufferI) GoType }
type BufLowerer ¶
type BufLowerer[GoType any] interface { Lower(value GoType) C.RustBuffer }
type BuildInfo ¶
type BuildInfo struct {
// Semantic version (e.g., "0.7.0")
Version string
// Git commit hash (short)
GitSha string
// Build date in ISO 8601 UTC format
BuildDate string
// Build profile (debug/release)
Profile string
}
Build information for the SLIM bindings
type ClientConfig ¶
Client configuration for connecting to a SLIM server
func (*ClientConfig) Destroy ¶
func (r *ClientConfig) Destroy()
type FfiCompletionHandle ¶
type FfiCompletionHandle struct {
// contains filtered or unexported fields
}
FFI-compatible completion handle for async operations
Represents a pending operation that can be awaited to ensure completion. Used for operations that need delivery confirmation or handshake acknowledgment.
# Design Note Since Rust futures can only be polled once to completion, this handle uses a shared receiver that can only be consumed once. Attempting to wait multiple times on the same handle will return an error.
Examples ¶
Basic usage: ```ignore let completion = session.publish_with_completion(data, None, None)?; completion.wait()?; // Wait for delivery confirmation ```
func (*FfiCompletionHandle) Destroy ¶
func (object *FfiCompletionHandle) Destroy()
func (*FfiCompletionHandle) Wait ¶
func (_self *FfiCompletionHandle) Wait() error
Wait for the operation to complete indefinitely (blocking version)
This blocks the calling thread until the operation completes. Use this from Go or other languages when you need to ensure an operation has finished before proceeding.
**Note:** This can only be called once per handle. Subsequent calls will return an error.
# Returns * `Ok(())` - Operation completed successfully * `Err(SlimError)` - Operation failed or handle already consumed
func (*FfiCompletionHandle) WaitAsync ¶
func (_self *FfiCompletionHandle) WaitAsync() error
Wait for the operation to complete indefinitely (async version)
This is the async version that integrates with UniFFI's polling mechanism. The operation will yield control while waiting.
**Note:** This can only be called once per handle. Subsequent calls will return an error.
# Returns * `Ok(())` - Operation completed successfully * `Err(SlimError)` - Operation failed or handle already consumed
func (*FfiCompletionHandle) WaitFor ¶
func (_self *FfiCompletionHandle) WaitFor(timeout time.Duration) error
Wait for the operation to complete with a timeout (blocking version)
This blocks the calling thread until the operation completes or the timeout expires. Use this from Go or other languages when you need to ensure an operation has finished before proceeding with a time limit.
**Note:** This can only be called once per handle. Subsequent calls will return an error.
# Arguments * `timeout` - Maximum time to wait for completion
# Returns * `Ok(())` - Operation completed successfully * `Err(SlimError::Timeout)` - If the operation timed out * `Err(SlimError)` - Operation failed or handle already consumed
func (*FfiCompletionHandle) WaitForAsync ¶
func (_self *FfiCompletionHandle) WaitForAsync(timeout time.Duration) error
Wait for the operation to complete with a timeout (async version)
This is the async version that integrates with UniFFI's polling mechanism. The operation will yield control while waiting until completion or timeout.
**Note:** This can only be called once per handle. Subsequent calls will return an error.
# Arguments * `timeout` - Maximum time to wait for completion
# Returns * `Ok(())` - Operation completed successfully * `Err(SlimError::Timeout)` - If the operation timed out * `Err(SlimError)` - Operation failed or handle already consumed
type FfiCompletionHandleInterface ¶
type FfiCompletionHandleInterface interface {
// Wait for the operation to complete indefinitely (blocking version)
//
// This blocks the calling thread until the operation completes.
// Use this from Go or other languages when you need to ensure
// an operation has finished before proceeding.
//
// **Note:** This can only be called once per handle. Subsequent calls
// will return an error.
//
// # Returns
// * `Ok(())` - Operation completed successfully
// * `Err(SlimError)` - Operation failed or handle already consumed
Wait() error
// Wait for the operation to complete indefinitely (async version)
//
// This is the async version that integrates with UniFFI's polling mechanism.
// The operation will yield control while waiting.
//
// **Note:** This can only be called once per handle. Subsequent calls
// will return an error.
//
// # Returns
// * `Ok(())` - Operation completed successfully
// * `Err(SlimError)` - Operation failed or handle already consumed
WaitAsync() error
// Wait for the operation to complete with a timeout (blocking version)
//
// This blocks the calling thread until the operation completes or the timeout expires.
// Use this from Go or other languages when you need to ensure
// an operation has finished before proceeding with a time limit.
//
// **Note:** This can only be called once per handle. Subsequent calls
// will return an error.
//
// # Arguments
// * `timeout` - Maximum time to wait for completion
//
// # Returns
// * `Ok(())` - Operation completed successfully
// * `Err(SlimError::Timeout)` - If the operation timed out
// * `Err(SlimError)` - Operation failed or handle already consumed
WaitFor(timeout time.Duration) error
// Wait for the operation to complete with a timeout (async version)
//
// This is the async version that integrates with UniFFI's polling mechanism.
// The operation will yield control while waiting until completion or timeout.
//
// **Note:** This can only be called once per handle. Subsequent calls
// will return an error.
//
// # Arguments
// * `timeout` - Maximum time to wait for completion
//
// # Returns
// * `Ok(())` - Operation completed successfully
// * `Err(SlimError::Timeout)` - If the operation timed out
// * `Err(SlimError)` - Operation failed or handle already consumed
WaitForAsync(timeout time.Duration) error
}
FFI-compatible completion handle for async operations
Represents a pending operation that can be awaited to ensure completion. Used for operations that need delivery confirmation or handshake acknowledgment.
# Design Note Since Rust futures can only be polled once to completion, this handle uses a shared receiver that can only be consumed once. Attempting to wait multiple times on the same handle will return an error.
Examples ¶
Basic usage: ```ignore let completion = session.publish_with_completion(data, None, None)?; completion.wait()?; // Wait for delivery confirmation ```
type FfiConverterBindingsAdapter ¶
type FfiConverterBindingsAdapter struct{}
func (FfiConverterBindingsAdapter) Lift ¶
func (c FfiConverterBindingsAdapter) Lift(pointer unsafe.Pointer) *BindingsAdapter
func (FfiConverterBindingsAdapter) Lower ¶
func (c FfiConverterBindingsAdapter) Lower(value *BindingsAdapter) unsafe.Pointer
func (FfiConverterBindingsAdapter) Read ¶
func (c FfiConverterBindingsAdapter) Read(reader io.Reader) *BindingsAdapter
func (FfiConverterBindingsAdapter) Write ¶
func (c FfiConverterBindingsAdapter) Write(writer io.Writer, value *BindingsAdapter)
type FfiConverterBindingsSessionContext ¶
type FfiConverterBindingsSessionContext struct{}
func (FfiConverterBindingsSessionContext) Lift ¶
func (c FfiConverterBindingsSessionContext) Lift(pointer unsafe.Pointer) *BindingsSessionContext
func (FfiConverterBindingsSessionContext) Lower ¶
func (c FfiConverterBindingsSessionContext) Lower(value *BindingsSessionContext) unsafe.Pointer
func (FfiConverterBindingsSessionContext) Read ¶
func (c FfiConverterBindingsSessionContext) Read(reader io.Reader) *BindingsSessionContext
func (FfiConverterBindingsSessionContext) Write ¶
func (c FfiConverterBindingsSessionContext) Write(writer io.Writer, value *BindingsSessionContext)
type FfiConverterBool ¶
type FfiConverterBool struct{}
type FfiConverterBuildInfo ¶
type FfiConverterBuildInfo struct{}
func (FfiConverterBuildInfo) Lift ¶
func (c FfiConverterBuildInfo) Lift(rb RustBufferI) BuildInfo
func (FfiConverterBuildInfo) Lower ¶
func (c FfiConverterBuildInfo) Lower(value BuildInfo) C.RustBuffer
type FfiConverterBytes ¶
type FfiConverterBytes struct{}
func (FfiConverterBytes) Lift ¶
func (c FfiConverterBytes) Lift(rb RustBufferI) []byte
func (FfiConverterBytes) Lower ¶
func (c FfiConverterBytes) Lower(value []byte) C.RustBuffer
type FfiConverterClientConfig ¶
type FfiConverterClientConfig struct{}
func (FfiConverterClientConfig) Lift ¶
func (c FfiConverterClientConfig) Lift(rb RustBufferI) ClientConfig
func (FfiConverterClientConfig) Lower ¶
func (c FfiConverterClientConfig) Lower(value ClientConfig) C.RustBuffer
func (FfiConverterClientConfig) Read ¶
func (c FfiConverterClientConfig) Read(reader io.Reader) ClientConfig
func (FfiConverterClientConfig) Write ¶
func (c FfiConverterClientConfig) Write(writer io.Writer, value ClientConfig)
type FfiConverterDuration ¶
type FfiConverterDuration struct{}
FfiConverterDuration converts between uniffi duration and Go duration.
func (FfiConverterDuration) Lift ¶
func (c FfiConverterDuration) Lift(rb RustBufferI) time.Duration
func (FfiConverterDuration) Lower ¶
func (c FfiConverterDuration) Lower(value time.Duration) C.RustBuffer
type FfiConverterFfiCompletionHandle ¶
type FfiConverterFfiCompletionHandle struct{}
func (FfiConverterFfiCompletionHandle) Lift ¶
func (c FfiConverterFfiCompletionHandle) Lift(pointer unsafe.Pointer) *FfiCompletionHandle
func (FfiConverterFfiCompletionHandle) Lower ¶
func (c FfiConverterFfiCompletionHandle) Lower(value *FfiCompletionHandle) unsafe.Pointer
func (FfiConverterFfiCompletionHandle) Read ¶
func (c FfiConverterFfiCompletionHandle) Read(reader io.Reader) *FfiCompletionHandle
func (FfiConverterFfiCompletionHandle) Write ¶
func (c FfiConverterFfiCompletionHandle) Write(writer io.Writer, value *FfiCompletionHandle)
type FfiConverterMapStringString ¶
type FfiConverterMapStringString struct{}
func (FfiConverterMapStringString) Lift ¶
func (c FfiConverterMapStringString) Lift(rb RustBufferI) map[string]string
func (FfiConverterMapStringString) Lower ¶
func (c FfiConverterMapStringString) Lower(value map[string]string) C.RustBuffer
type FfiConverterMessageContext ¶
type FfiConverterMessageContext struct{}
func (FfiConverterMessageContext) Lift ¶
func (c FfiConverterMessageContext) Lift(rb RustBufferI) MessageContext
func (FfiConverterMessageContext) Lower ¶
func (c FfiConverterMessageContext) Lower(value MessageContext) C.RustBuffer
func (FfiConverterMessageContext) Read ¶
func (c FfiConverterMessageContext) Read(reader io.Reader) MessageContext
func (FfiConverterMessageContext) Write ¶
func (c FfiConverterMessageContext) Write(writer io.Writer, value MessageContext)
type FfiConverterName ¶
type FfiConverterName struct{}
func (FfiConverterName) Lift ¶
func (c FfiConverterName) Lift(rb RustBufferI) Name
func (FfiConverterName) Lower ¶
func (c FfiConverterName) Lower(value Name) C.RustBuffer
type FfiConverterOptionalBool ¶
type FfiConverterOptionalBool struct{}
func (FfiConverterOptionalBool) Lift ¶
func (c FfiConverterOptionalBool) Lift(rb RustBufferI) *bool
func (FfiConverterOptionalBool) Lower ¶
func (c FfiConverterOptionalBool) Lower(value *bool) C.RustBuffer
type FfiConverterOptionalMapStringString ¶
type FfiConverterOptionalMapStringString struct{}
func (FfiConverterOptionalMapStringString) Lift ¶
func (c FfiConverterOptionalMapStringString) Lift(rb RustBufferI) *map[string]string
func (FfiConverterOptionalMapStringString) Lower ¶
func (c FfiConverterOptionalMapStringString) Lower(value *map[string]string) C.RustBuffer
type FfiConverterOptionalName ¶
type FfiConverterOptionalName struct{}
func (FfiConverterOptionalName) Lift ¶
func (c FfiConverterOptionalName) Lift(rb RustBufferI) *Name
func (FfiConverterOptionalName) Lower ¶
func (c FfiConverterOptionalName) Lower(value *Name) C.RustBuffer
type FfiConverterOptionalString ¶
type FfiConverterOptionalString struct{}
func (FfiConverterOptionalString) Lift ¶
func (c FfiConverterOptionalString) Lift(rb RustBufferI) *string
func (FfiConverterOptionalString) Lower ¶
func (c FfiConverterOptionalString) Lower(value *string) C.RustBuffer
type FfiConverterOptionalUint32 ¶
type FfiConverterOptionalUint32 struct{}
func (FfiConverterOptionalUint32) Lift ¶
func (c FfiConverterOptionalUint32) Lift(rb RustBufferI) *uint32
func (FfiConverterOptionalUint32) Lower ¶
func (c FfiConverterOptionalUint32) Lower(value *uint32) C.RustBuffer
type FfiConverterOptionalUint64 ¶
type FfiConverterOptionalUint64 struct{}
func (FfiConverterOptionalUint64) Lift ¶
func (c FfiConverterOptionalUint64) Lift(rb RustBufferI) *uint64
func (FfiConverterOptionalUint64) Lower ¶
func (c FfiConverterOptionalUint64) Lower(value *uint64) C.RustBuffer
type FfiConverterReceivedMessage ¶
type FfiConverterReceivedMessage struct{}
func (FfiConverterReceivedMessage) Lift ¶
func (c FfiConverterReceivedMessage) Lift(rb RustBufferI) ReceivedMessage
func (FfiConverterReceivedMessage) Lower ¶
func (c FfiConverterReceivedMessage) Lower(value ReceivedMessage) C.RustBuffer
func (FfiConverterReceivedMessage) Read ¶
func (c FfiConverterReceivedMessage) Read(reader io.Reader) ReceivedMessage
func (FfiConverterReceivedMessage) Write ¶
func (c FfiConverterReceivedMessage) Write(writer io.Writer, value ReceivedMessage)
type FfiConverterSequenceString ¶
type FfiConverterSequenceString struct{}
func (FfiConverterSequenceString) Lift ¶
func (c FfiConverterSequenceString) Lift(rb RustBufferI) []string
func (FfiConverterSequenceString) Lower ¶
func (c FfiConverterSequenceString) Lower(value []string) C.RustBuffer
type FfiConverterServerConfig ¶
type FfiConverterServerConfig struct{}
func (FfiConverterServerConfig) Lift ¶
func (c FfiConverterServerConfig) Lift(rb RustBufferI) ServerConfig
func (FfiConverterServerConfig) Lower ¶
func (c FfiConverterServerConfig) Lower(value ServerConfig) C.RustBuffer
func (FfiConverterServerConfig) Read ¶
func (c FfiConverterServerConfig) Read(reader io.Reader) ServerConfig
func (FfiConverterServerConfig) Write ¶
func (c FfiConverterServerConfig) Write(writer io.Writer, value ServerConfig)
type FfiConverterSessionConfig ¶
type FfiConverterSessionConfig struct{}
func (FfiConverterSessionConfig) Lift ¶
func (c FfiConverterSessionConfig) Lift(rb RustBufferI) SessionConfig
func (FfiConverterSessionConfig) Lower ¶
func (c FfiConverterSessionConfig) Lower(value SessionConfig) C.RustBuffer
func (FfiConverterSessionConfig) Read ¶
func (c FfiConverterSessionConfig) Read(reader io.Reader) SessionConfig
func (FfiConverterSessionConfig) Write ¶
func (c FfiConverterSessionConfig) Write(writer io.Writer, value SessionConfig)
type FfiConverterSessionType ¶
type FfiConverterSessionType struct{}
func (FfiConverterSessionType) Lift ¶
func (c FfiConverterSessionType) Lift(rb RustBufferI) SessionType
func (FfiConverterSessionType) Lower ¶
func (c FfiConverterSessionType) Lower(value SessionType) C.RustBuffer
func (FfiConverterSessionType) Read ¶
func (FfiConverterSessionType) Read(reader io.Reader) SessionType
func (FfiConverterSessionType) Write ¶
func (FfiConverterSessionType) Write(writer io.Writer, value SessionType)
type FfiConverterSlimError ¶
type FfiConverterSlimError struct{}
func (FfiConverterSlimError) Lift ¶
func (c FfiConverterSlimError) Lift(eb RustBufferI) *SlimError
func (FfiConverterSlimError) Lower ¶
func (c FfiConverterSlimError) Lower(value *SlimError) C.RustBuffer
type FfiConverterString ¶
type FfiConverterString struct{}
func (FfiConverterString) Lift ¶
func (FfiConverterString) Lift(rb RustBufferI) string
func (FfiConverterString) Lower ¶
func (FfiConverterString) Lower(value string) C.RustBuffer
type FfiConverterTlsConfig ¶
type FfiConverterTlsConfig struct{}
func (FfiConverterTlsConfig) Lift ¶
func (c FfiConverterTlsConfig) Lift(rb RustBufferI) TlsConfig
func (FfiConverterTlsConfig) Lower ¶
func (c FfiConverterTlsConfig) Lower(value TlsConfig) C.RustBuffer
type FfiConverterUint32 ¶
type FfiConverterUint32 struct{}
type FfiConverterUint64 ¶
type FfiConverterUint64 struct{}
type FfiDestroyerBindingsAdapter ¶
type FfiDestroyerBindingsAdapter struct{}
func (FfiDestroyerBindingsAdapter) Destroy ¶
func (_ FfiDestroyerBindingsAdapter) Destroy(value *BindingsAdapter)
type FfiDestroyerBindingsSessionContext ¶
type FfiDestroyerBindingsSessionContext struct{}
func (FfiDestroyerBindingsSessionContext) Destroy ¶
func (_ FfiDestroyerBindingsSessionContext) Destroy(value *BindingsSessionContext)
type FfiDestroyerBool ¶
type FfiDestroyerBool struct{}
func (FfiDestroyerBool) Destroy ¶
func (FfiDestroyerBool) Destroy(_ bool)
type FfiDestroyerBuildInfo ¶
type FfiDestroyerBuildInfo struct{}
func (FfiDestroyerBuildInfo) Destroy ¶
func (_ FfiDestroyerBuildInfo) Destroy(value BuildInfo)
type FfiDestroyerBytes ¶
type FfiDestroyerBytes struct{}
func (FfiDestroyerBytes) Destroy ¶
func (FfiDestroyerBytes) Destroy(_ []byte)
type FfiDestroyerClientConfig ¶
type FfiDestroyerClientConfig struct{}
func (FfiDestroyerClientConfig) Destroy ¶
func (_ FfiDestroyerClientConfig) Destroy(value ClientConfig)
type FfiDestroyerDuration ¶
type FfiDestroyerDuration struct{}
func (FfiDestroyerDuration) Destroy ¶
func (FfiDestroyerDuration) Destroy(_ time.Duration)
type FfiDestroyerFfiCompletionHandle ¶
type FfiDestroyerFfiCompletionHandle struct{}
func (FfiDestroyerFfiCompletionHandle) Destroy ¶
func (_ FfiDestroyerFfiCompletionHandle) Destroy(value *FfiCompletionHandle)
type FfiDestroyerMapStringString ¶
type FfiDestroyerMapStringString struct{}
func (FfiDestroyerMapStringString) Destroy ¶
func (_ FfiDestroyerMapStringString) Destroy(mapValue map[string]string)
type FfiDestroyerMessageContext ¶
type FfiDestroyerMessageContext struct{}
func (FfiDestroyerMessageContext) Destroy ¶
func (_ FfiDestroyerMessageContext) Destroy(value MessageContext)
type FfiDestroyerName ¶
type FfiDestroyerName struct{}
func (FfiDestroyerName) Destroy ¶
func (_ FfiDestroyerName) Destroy(value Name)
type FfiDestroyerOptionalBool ¶
type FfiDestroyerOptionalBool struct{}
func (FfiDestroyerOptionalBool) Destroy ¶
func (_ FfiDestroyerOptionalBool) Destroy(value *bool)
type FfiDestroyerOptionalMapStringString ¶
type FfiDestroyerOptionalMapStringString struct{}
func (FfiDestroyerOptionalMapStringString) Destroy ¶
func (_ FfiDestroyerOptionalMapStringString) Destroy(value *map[string]string)
type FfiDestroyerOptionalName ¶
type FfiDestroyerOptionalName struct{}
func (FfiDestroyerOptionalName) Destroy ¶
func (_ FfiDestroyerOptionalName) Destroy(value *Name)
type FfiDestroyerOptionalString ¶
type FfiDestroyerOptionalString struct{}
func (FfiDestroyerOptionalString) Destroy ¶
func (_ FfiDestroyerOptionalString) Destroy(value *string)
type FfiDestroyerOptionalUint32 ¶
type FfiDestroyerOptionalUint32 struct{}
func (FfiDestroyerOptionalUint32) Destroy ¶
func (_ FfiDestroyerOptionalUint32) Destroy(value *uint32)
type FfiDestroyerOptionalUint64 ¶
type FfiDestroyerOptionalUint64 struct{}
func (FfiDestroyerOptionalUint64) Destroy ¶
func (_ FfiDestroyerOptionalUint64) Destroy(value *uint64)
type FfiDestroyerReceivedMessage ¶
type FfiDestroyerReceivedMessage struct{}
func (FfiDestroyerReceivedMessage) Destroy ¶
func (_ FfiDestroyerReceivedMessage) Destroy(value ReceivedMessage)
type FfiDestroyerSequenceString ¶
type FfiDestroyerSequenceString struct{}
func (FfiDestroyerSequenceString) Destroy ¶
func (FfiDestroyerSequenceString) Destroy(sequence []string)
type FfiDestroyerServerConfig ¶
type FfiDestroyerServerConfig struct{}
func (FfiDestroyerServerConfig) Destroy ¶
func (_ FfiDestroyerServerConfig) Destroy(value ServerConfig)
type FfiDestroyerSessionConfig ¶
type FfiDestroyerSessionConfig struct{}
func (FfiDestroyerSessionConfig) Destroy ¶
func (_ FfiDestroyerSessionConfig) Destroy(value SessionConfig)
type FfiDestroyerSessionType ¶
type FfiDestroyerSessionType struct{}
func (FfiDestroyerSessionType) Destroy ¶
func (_ FfiDestroyerSessionType) Destroy(value SessionType)
type FfiDestroyerSlimError ¶
type FfiDestroyerSlimError struct{}
func (FfiDestroyerSlimError) Destroy ¶
func (_ FfiDestroyerSlimError) Destroy(value *SlimError)
type FfiDestroyerString ¶
type FfiDestroyerString struct{}
func (FfiDestroyerString) Destroy ¶
func (FfiDestroyerString) Destroy(_ string)
type FfiDestroyerTlsConfig ¶
type FfiDestroyerTlsConfig struct{}
func (FfiDestroyerTlsConfig) Destroy ¶
func (_ FfiDestroyerTlsConfig) Destroy(value TlsConfig)
type FfiDestroyerUint32 ¶
type FfiDestroyerUint32 struct{}
func (FfiDestroyerUint32) Destroy ¶
func (FfiDestroyerUint32) Destroy(_ uint32)
type FfiDestroyerUint64 ¶
type FfiDestroyerUint64 struct{}
func (FfiDestroyerUint64) Destroy ¶
func (FfiDestroyerUint64) Destroy(_ uint64)
type GoRustBuffer ¶
type GoRustBuffer struct {
// contains filtered or unexported fields
}
This is needed, because as of go 1.24 type RustBuffer C.RustBuffer cannot have methods, RustBuffer is treated as non-local type
func RustBufferFromExternal ¶
func RustBufferFromExternal(b RustBufferI) GoRustBuffer
func (GoRustBuffer) AsReader ¶
func (cb GoRustBuffer) AsReader() *bytes.Reader
func (GoRustBuffer) Capacity ¶
func (cb GoRustBuffer) Capacity() uint64
func (GoRustBuffer) Data ¶
func (cb GoRustBuffer) Data() unsafe.Pointer
func (GoRustBuffer) Free ¶
func (cb GoRustBuffer) Free()
func (GoRustBuffer) Len ¶
func (cb GoRustBuffer) Len() uint64
func (GoRustBuffer) ToGoBytes ¶
func (cb GoRustBuffer) ToGoBytes() []byte
type MessageContext ¶
type MessageContext struct {
// Fully-qualified sender identity
SourceName Name
// Fully-qualified destination identity (may be empty for broadcast/group scenarios)
DestinationName *Name
// Logical/semantic type (defaults to "msg" if unspecified)
PayloadType string
// Arbitrary key/value pairs supplied by the sender (e.g. tracing IDs)
Metadata map[string]string
// Numeric identifier of the inbound connection carrying the message
InputConnection uint64
// Identity contained in the message
Identity string
}
Generic message context for language bindings (UniFFI-compatible)
Provides routing and descriptive metadata needed for replying, auditing, and instrumentation across different language bindings. This type is exported to foreign languages via UniFFI.
func (*MessageContext) Destroy ¶
func (r *MessageContext) Destroy()
type NativeError ¶
type NativeError interface {
AsError() error
}
type ReceivedMessage ¶
type ReceivedMessage struct {
Context MessageContext
Payload []byte
}
Received message containing context and payload
func (*ReceivedMessage) Destroy ¶
func (r *ReceivedMessage) Destroy()
type RustBufferI ¶
type ServerConfig ¶
Server configuration for running a SLIM server
func (*ServerConfig) Destroy ¶
func (r *ServerConfig) Destroy()
type SessionConfig ¶
type SessionConfig struct {
// Session type (PointToPoint or Group)
SessionType SessionType
// Enable MLS encryption for this session
EnableMls bool
// Maximum number of retries for message transmission (None = use default)
MaxRetries *uint32
// Interval between retries in milliseconds (None = use default)
IntervalMs *uint64
// Whether this endpoint is the session initiator
Initiator bool
// Custom metadata key-value pairs for the session
Metadata map[string]string
}
Session configuration
func (*SessionConfig) Destroy ¶
func (r *SessionConfig) Destroy()
type SessionType ¶
type SessionType uint
Session type enum
const ( SessionTypePointToPoint SessionType = 1 SessionTypeGroup SessionType = 2 )
type SlimError ¶
type SlimError struct {
// contains filtered or unexported fields
}
Error types for SLIM operations
func NewSlimErrorAuthError ¶
func NewSlimErrorSendError ¶
func NewSlimErrorTimeout ¶
func NewSlimErrorTimeout() *SlimError
type SlimErrorAuthError ¶
type SlimErrorAuthError struct {
Message string
}
func (SlimErrorAuthError) Error ¶
func (err SlimErrorAuthError) Error() string
func (SlimErrorAuthError) Is ¶
func (self SlimErrorAuthError) Is(target error) bool
type SlimErrorInternalError ¶
type SlimErrorInternalError struct {
Message string
}
func (SlimErrorInternalError) Error ¶
func (err SlimErrorInternalError) Error() string
func (SlimErrorInternalError) Is ¶
func (self SlimErrorInternalError) Is(target error) bool
type SlimErrorInvalidArgument ¶
type SlimErrorInvalidArgument struct {
Message string
}
func (SlimErrorInvalidArgument) Error ¶
func (err SlimErrorInvalidArgument) Error() string
func (SlimErrorInvalidArgument) Is ¶
func (self SlimErrorInvalidArgument) Is(target error) bool
type SlimErrorReceiveError ¶
type SlimErrorReceiveError struct {
Message string
}
func (SlimErrorReceiveError) Error ¶
func (err SlimErrorReceiveError) Error() string
func (SlimErrorReceiveError) Is ¶
func (self SlimErrorReceiveError) Is(target error) bool
type SlimErrorSendError ¶
type SlimErrorSendError struct {
Message string
}
func (SlimErrorSendError) Error ¶
func (err SlimErrorSendError) Error() string
func (SlimErrorSendError) Is ¶
func (self SlimErrorSendError) Is(target error) bool
type SlimErrorServiceError ¶
type SlimErrorServiceError struct {
Message string
}
Variant structs
func (SlimErrorServiceError) Error ¶
func (err SlimErrorServiceError) Error() string
func (SlimErrorServiceError) Is ¶
func (self SlimErrorServiceError) Is(target error) bool
type SlimErrorSessionError ¶
type SlimErrorSessionError struct {
Message string
}
func (SlimErrorSessionError) Error ¶
func (err SlimErrorSessionError) Error() string
func (SlimErrorSessionError) Is ¶
func (self SlimErrorSessionError) Is(target error) bool
type SlimErrorTimeout ¶
type SlimErrorTimeout struct {
}
func (SlimErrorTimeout) Error ¶
func (err SlimErrorTimeout) Error() string
func (SlimErrorTimeout) Is ¶
func (self SlimErrorTimeout) Is(target error) bool
type TlsConfig ¶
type TlsConfig struct {
// Disable TLS entirely (plain text connection)
Insecure bool
// Skip server certificate verification (client only, enables TLS but doesn't verify certs)
// WARNING: Only use for testing - insecure in production!
InsecureSkipVerify *bool
// Path to certificate file (PEM format)
CertFile *string
// Path to private key file (PEM format)
KeyFile *string
// Path to CA certificate file (PEM format) for verifying peer certificates
CaFile *string
// TLS version to use: "tls1.2" or "tls1.3" (default: "tls1.3")
TlsVersion *string
// Include system CA certificates pool (default: false)
IncludeSystemCaCertsPool *bool
}
TLS configuration for server/client
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
slim-bindings-setup
command
slim-bindings-setup downloads and installs the SLIM bindings native library.
|
slim-bindings-setup downloads and installs the SLIM bindings native library. |