package
1.19.7
Repository: https://github.com/yomorun/yomo.git
Documentation: pkg.go.dev

# Packages

Package auth provides authentication.
Package frame defines frames for yomo.
Package metadata defines Metadata of the DataFrame.
Package router defines the interface of router.
Package serverless provides the server serverless function context.
Package ylog provides handler that supports splitting log stream to common log stream and error log stream.

# Functions

DefaultVersionNegotiateFunc is default version negotiate function.
DisableOtelTrace determines whether to disable otel trace.
GetTIDFromMetadata gets TID from metadata.
NewClient creates a new YoMo-Client.
NewConnection creates a new connection according to the parameters.
NewConnector returns an initial Connector.
NewMetadata returns metadata for yomo working.
NewServer create a Server instance.
SetMetadataTarget sets target in metadata.
WithAIFunctionDefinition sets AI function definition for the client.
WithAIFunctionJsonDefinition sets AI function definition for the client in the form of jsonschema string.
WithAuth sets the server authentication method.
WithClientQuicConfig sets quic config for the client.
WithClientTLSConfig sets tls config for the client.
WithConnector sets connector for the server.
WithConnMiddleware sets conn middleware for the client.
WithCredential sets the client credential method (used by client).
WithFrameListener adds a Listener other than a quic.Listener.
WithFrameMiddleware sets frame middleware for the client.
WithLogger sets logger for the client.
WithNonBlockWrite makes client WriteFrame non-blocking.
WithReConnect makes client Connect until success, unless authentication fails.
WithRouter sets router for the server.
WithServerLogger sets logger for the server.
WithServerQuicConfig sets the QUIC configuration for the server.
WithServerTLSConfig sets the TLS configuration for the server.
WithVersionNegotiateFunc sets the version negotiate function.

# Constants

ClientTypeSource is client type "Source".
ClientTypeStreamFunction is client type "Stream Function".
ClientTypeUpstreamZipper is client type "Upstream Zipper".
Version is the current yomo spec version.

# Variables

DefaultClientQuicConfig be used when the `quicConfig` of client is nil.
DefaultQuicConfig be used when `quicConfig` is nil.
ErrConnectorClosed will be returned if the Connector has been closed.
ErrServerClosed is returned by the Server's Serve and ListenAndServe methods after a call to Shutdown or Close.

# Structs

Client is the abstraction of a YoMo-Client.
Connection wraps connection and stream for transmitting frames, it can be used for reading and writing frames, and is managed by the Connector.
Context is context for frame handling.
ErrConnectTo is returned by VersionNegotiateFunc if you want to connect to a new server.
ErrRejected is returned by VersionNegotiateFunc if you want to reject the connection.
Server is the underlying server of Zipper.

# Interfaces

ConnectionInfo holds the information of connection.
Connector manages connections and provides a centralized way for getting and setting streams.
Downstream represents a frame writer that can connect to an addr.

# Type aliases

AsyncHandler is the request-response mode (asnyc).
ClientOption YoMo client options.
ClientType is the type of client.
No description provided by the author
No description provided by the author
CronHandler is the cron mode.
FindConnectionFunc is used to search for a specific connection within the Connector.
No description provided by the author
No description provided by the author
PipeHandler is the bidirectional stream mode (blocking).
ServerOption is the option for server.
VersionNegotiateFunc is the version negotiate function.