Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( VersionTag string CommitHash string BuildDate string )
The following variables are set by -ldflags at build time.
Functions ¶
func ConnectNats ¶ added in v1.1.1377
func ConnectNats(jetstreamDomain string, natsUrl string, natsConnOptions []nats.Option, ephemeralStorage bool) (*natz.NatsConnConfiguration, error)
ConnectNats establishes a connection to the NATS server using the given URL. It also creates a separate transactional NATS connection. It checks the NATS server version and obtains the JetStream account information. It returns the NATS connection configuration that includes the NATS connection, transactional NATS connection, and the storage type for JetStream.
Parameters: - natsURL: The URL of the NATS server. - ephemeral: A flag indicating whether to use ephemeral storage for JetStream.
Returns: - NatsConnConfiguration: The NATS connection configuration. - error: An error if the connection or account retrieval fails.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the shar server type responsible for hosting the SHAR API.
func (*Server) GetEndPoint ¶ added in v1.0.623
GetEndPoint will return the URL of the GRPC health endpoint for the shar server
func (*Server) Listen ¶
Listen starts the GRPC server for both serving requests, and the GRPC health endpoint.