ironhawk

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxClientsReached = errors.New("maximum number of clients reached")
	ErrIOThreadNotFound  = errors.New("io-thread not found")
)

Functions

This section is empty.

Types

type IOThread

type IOThread struct {
	ClientID string
	Mode     string
	Session  *auth.Session
	// contains filtered or unexported fields
}

func NewIOThread

func NewIOThread(clientFD int) (*IOThread, error)

func (*IOThread) Start added in v1.0.7

func (t *IOThread) Start(ctx context.Context, shardManager *shardmanager.ShardManager, watchManager *WatchManager) error

func (*IOThread) Stop

func (t *IOThread) Stop() error

type IOThreadManager

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

func NewIOThreadManager

func NewIOThreadManager() *IOThreadManager

func (*IOThreadManager) IOThreadCount

func (m *IOThreadManager) IOThreadCount() uint32

func (*IOThreadManager) RegisterIOThread

func (m *IOThreadManager) RegisterIOThread(ioThread *IOThread) error

func (*IOThreadManager) UnregisterIOThread

func (m *IOThreadManager) UnregisterIOThread(id string) error

type Server

type Server struct {
	Host string
	Port int
	// contains filtered or unexported fields
}

func NewServer

func NewServer(shardManager *shardmanager.ShardManager, ioThreadManager *IOThreadManager, watchManager *WatchManager) *Server

func (*Server) AcceptConnectionRequests

func (s *Server) AcceptConnectionRequests(ctx context.Context, wg *sync.WaitGroup) error

func (*Server) BindAndListen

func (s *Server) BindAndListen() error

func (*Server) Run

func (s *Server) Run(ctx context.Context) (err error)

func (*Server) Shutdown

func (s *Server) Shutdown()

type WatchManager

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

func NewWatchManager

func NewWatchManager() *WatchManager

func (*WatchManager) CleanupThreadWatchSubscriptions

func (w *WatchManager) CleanupThreadWatchSubscriptions(t *IOThread)

func (*WatchManager) HandleUnwatch

func (w *WatchManager) HandleUnwatch(c *cmd.Cmd, t *IOThread)

func (*WatchManager) HandleWatch

func (w *WatchManager) HandleWatch(c *cmd.Cmd, t *IOThread)

func (*WatchManager) NotifyWatchers

func (w *WatchManager) NotifyWatchers(c *cmd.Cmd, shardManager *shardmanager.ShardManager, t *IOThread)

func (*WatchManager) RegisterThread

func (w *WatchManager) RegisterThread(t *IOThread)

Jump to

Keyboard shortcuts

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