Documentation
¶
Index ¶
- func IsImageError(err error) bool
- func IsInvalidRequest(err error) bool
- func IsNoPortAvailable(err error) bool
- func IsSSHNotAvailable(err error) bool
- func IsTunnelError(err error) bool
- type Error
- type ErrorCode
- type Server
- func (s *Server) Done() <-chan struct{}
- func (s *Server) GetTunnelImageUrl() string
- func (s *Server) MessageChan() <-chan types.Message
- func (s *Server) Ready() <-chan struct{}
- func (s *Server) SendPostRequest(ctx context.Context, url, key, model string, useStream bool)
- func (s *Server) Shutdown() error
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) TunnelURL() string
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImageError ¶
IsImageError checks if the error is an image generation error
func IsInvalidRequest ¶
IsInvalidRequest checks if the error is an invalid request error
func IsNoPortAvailable ¶
IsNoPortAvailable checks if the error is a no port available error
func IsSSHNotAvailable ¶
IsSSHNotAvailable checks if the error is an SSH not available error
func IsTunnelError ¶
IsTunnelError checks if the error is a tunnel error
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) GetTunnelImageUrl ¶
GetTunnelURL returns the tunnel URL
func (*Server) MessageChan ¶
MessageChan returns the message channel
func (*Server) SendPostRequest ¶
SendPostRequest sends a POST request to test the API
type ServerOption ¶
type ServerOption func(*Server)
ServerOption represents a server configuration option
Click to show internal directories.
Click to hide internal directories.