6 changed files with 124 additions and 8 deletions
@ -0,0 +1,34 @@
|
||||
/* |
||||
------------------------------------------------------------------------------------------------------------------------ |
||||
####### cli ####### Copyright (c) 2021 mls-361 ##################################################### MIT License ####### |
||||
------------------------------------------------------------------------------------------------------------------------ |
||||
*/ |
||||
|
||||
package cli |
||||
|
||||
import ( |
||||
"fmt" |
||||
|
||||
"forge.chapril.org/armen/jw" |
||||
"forge.chapril.org/armen/requestor" |
||||
|
||||
"forge.chapril.org/armen/armen/internal/components" |
||||
) |
||||
|
||||
func newRequestor(ccs *components.Components) (jw.Model, error) { |
||||
cfg := ccs.Config.Server() |
||||
endpoint := &requestor.Endpoint{ |
||||
URL: fmt.Sprintf("http://localhost:%d", cfg.Port), |
||||
} |
||||
|
||||
rc := &requestor.Config{ |
||||
Logger: ccs.Logger, |
||||
Endpoints: []*requestor.Endpoint{endpoint}, |
||||
} |
||||
|
||||
return requestor.New(rc) |
||||
} |
||||
|
||||
/* |
||||
######################################################################################################## @(°_°)@ ####### |
||||
*/ |
Loading…
Reference in new issue