daemon

package
v1.2.1-0...-8b11bdd Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(listenAddr string, apiServer api.Server, logger log.Logger, stopCh <-chan struct{})

ListenAndServe starts a HTTP server instrumented with Prometheus metrics, health and API endpoints on the specified address.

func NewHandler

func NewHandler(s api.Server, r *mux.Router) http.Handler

NewHandler registers handlers on the given router.

Types

type APIServer

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

func (*APIServer) SyncGit

func (s *APIServer) SyncGit(w http.ResponseWriter, r *http.Request)

SyncGit starts a goroutine in the background to sync all git mirrors _if there is not one running at time of request_. It writes back a HTTP 200 status header and 'OK' body to inform the request was successful. TODO(hidde): in the future we may want to give users the option to request the status after it has been started. The Flux (daemon) API achieves this by working with jobs whos IDs can be tracked.

Jump to

Keyboard shortcuts

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