Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(srv *CoreService) error
func Start ¶
func Start[T listenEntry](srv *CoreService, addr T) error
func StructName ¶
Types ¶
type CoreService ¶
type CoreService struct {
// contains filtered or unexported fields
}
func NewPuzzleCore ¶
func NewPuzzleCore(opts ...ServiceOption) *CoreService
func (*CoreService) GracefulStopPuzzle ¶
func (c *CoreService) GracefulStopPuzzle()
type Options ¶
type Options struct { Ctx context.Context ServiceName string Tags []string Cmux cmux.CMux // contains filtered or unexported fields }
func (*Options) RegisterPuzzle ¶
RegisterPuzzle will put Puzzle into cores service It replaces the previously registered Puzzle with the same name
type ServiceOption ¶
type ServiceOption func(*Options)
func WithCronWorker ¶
func WithCronWorker(cron string, fn WorkerFunc) ServiceOption
func WithDaemonWorker ¶
func WithDaemonWorker(fn WorkerFunc) ServiceOption
func WithNameWorker ¶
func WithNameWorker(name string, fn WorkerFunc) ServiceOption
func WithWorker ¶
func WithWorker(fn WorkerFunc) ServiceOption
type WorkerFunc ¶
Click to show internal directories.
Click to hide internal directories.