server

package
v2026.708.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

func NewHub

func NewHub(store *responseStore) *Hub

func (*Hub) ActiveBuffer

func (h *Hub) ActiveBuffer() *eventBuffer

func (*Hub) ActiveResponseID

func (h *Hub) ActiveResponseID() string

func (*Hub) BeginTurn

func (h *Hub) BeginTurn(responseID, conversation string, cancel func()) *eventBuffer

func (*Hub) CancelActive

func (h *Hub) CancelActive() bool

func (*Hub) EndTurn

func (h *Hub) EndTurn()

func (*Hub) FinishTurn

func (h *Hub) FinishTurn(status, outputText string)

func (*Hub) GetStored

func (h *Hub) GetStored(id string) (*persistedResponse, bool)

func (*Hub) LiveConversation

func (h *Hub) LiveConversation() string

func (*Hub) Publish

func (h *Hub) Publish(ev streamEvent)

func (*Hub) SetLiveConversation

func (h *Hub) SetLiveConversation(id string)

func (*Hub) Subscribe

func (h *Hub) Subscribe() (chan streamEvent, func())

func (*Hub) TurnActive

func (h *Hub) TurnActive() bool

func (*Hub) WaitTurnDone

func (h *Hub) WaitTurnDone(responseID string) <-chan struct{}

type Options

type Options struct {
	Addr      string
	StaticDir string
	NoStatic  bool
	CertPath  string
	KeyPath   string
}

type Server

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

func New

func New(cfg *config.Root, prov *config.Provider, projHex, projRoot string, opts Options) (*Server, error)

func (*Server) BootstrapToken

func (s *Server) BootstrapToken() (string, error)

func (*Server) Fingerprint

func (s *Server) Fingerprint() (string, error)

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Hub

func (s *Server) Hub() *Hub

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

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

type TokenRecord

type TokenRecord struct {
	ID        string    `json:"id"`
	Hash      string    `json:"hash"`
	Label     string    `json:"label,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	Revoked   bool      `json:"revoked,omitempty"`
}

Jump to

Keyboard shortcuts

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