server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents the main application server

func New

func New(cfg *config.Config, opts ...ServerOption) *Server

New creates a new server instance

func (*Server) Done

func (s *Server) Done() <-chan struct{}

Done returns the done channel

func (*Server) GetTunnelImageUrl

func (s *Server) GetTunnelImageUrl() string

GetTunnelURL returns the tunnel URL

func (*Server) MessageChan

func (s *Server) MessageChan() <-chan types.Message

MessageChan returns the message channel

func (*Server) Ready

func (s *Server) Ready() <-chan struct{}

Ready returns the ready channel

func (*Server) SendPostRequest

func (s *Server) SendPostRequest(ctx context.Context, url, key, model string, useStream bool)

SendPostRequest sends a POST request to test the API

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown gracefully shuts down the server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the server

func (*Server) TunnelURL

func (s *Server) TunnelURL() string

TunnelURL returns the tunnel URL

type ServerOption

type ServerOption func(*Server)

ServerOption represents a server configuration option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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