add a little logging
This commit is contained in:
parent
25944b4b4c
commit
1557895e85
|
@ -71,6 +71,7 @@ func (c *Cluster) apiHandlerFunc(w http.ResponseWriter, r *http.Request) {
|
|||
func (c *Cluster) StartAPIServer(ctx context.Context, addr string) error {
|
||||
smux := http.NewServeMux()
|
||||
smux.HandleFunc("/", c.apiHandlerFunc)
|
||||
log.Printf("serving clusterd control api on %s", addr)
|
||||
go func() {
|
||||
err := http.ListenAndServe(addr, smux)
|
||||
if err != nil {
|
||||
|
@ -83,6 +84,7 @@ func (c *Cluster) StartAPIServer(ctx context.Context, addr string) error {
|
|||
func (c *Cluster) StartIPFSHandler(ctx context.Context, addr string) error {
|
||||
smux := http.NewServeMux()
|
||||
smux.HandleFunc("/", c.ipfsHandlerFunc)
|
||||
log.Printf("serving ipfs api on %s", addr)
|
||||
go func() {
|
||||
err := http.ListenAndServe(addr, smux)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user