Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cmd = &cobra.Command{ Use: "http", Short: "HTTP API daemon", SilenceUsage: true, SilenceErrors: true, Run: func(_ *cobra.Command, _ []string) { var ( sHttp *http.HTTP c func() e error ctxAll context.Context ctxCancel context.CancelFunc ) defer func() { if c != nil { c() } }() cmd.Slave.Executor(func(ctx context.Context) error { initial, _ := entrypoint.CtxExtractInitial(ctx) ctxAll, ctxCancel = context.WithCancel(ctx) sHttp, c, e = daemon.BuildHTTP(ctxAll, initial, cmd.Observer) if e != nil { return e } return nil }, func(ctx context.Context) error { var wg sync.WaitGroup wg.Add(1) go func() { if err := sHttp.ListenAndServe(); err != nil { e = err ctxCancel() } wg.Done() }() wg.Wait() return e }) }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.