Documentation
¶
Index ¶
- Variables
- func Logging(log logr.Logger, next http.Handler) http.Handler
- func NewLogger(name string) logr.Logger
- func NewReverseProxy(u Upstream) http.HandlerFunc
- func Startup(version, commit, date, builtBy string)
- type CronService
- type DefaultUpstream
- func (u *DefaultUpstream) GetDefault() (string, error)
- func (u *DefaultUpstream) Lookup(service string) (string, *exec.Cmd, error)
- func (u *DefaultUpstream) NextPort() (string, error)
- func (u *DefaultUpstream) Register(name, version string, process HTTPProcess, def bool)
- func (u *DefaultUpstream) SetDefault(name, version string) error
- func (u *DefaultUpstream) Unregister(name, version string)
- type GitServer
- type HTTPListener
- type HTTPProcess
- type SignalHandler
- type StateMachine
- type StoreService
- type Updater
- type Upstream
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRepositoryNotSync = errors.New("notsync") ErrCommitNotFound = errors.New("notfound") )
View Source
var ( ErrServiceNotFound = errors.New("notfound") ErrNoAvailablePort = errors.New("noport") )
ErrServiceNotFound default service
Functions ¶
func NewReverseProxy ¶
func NewReverseProxy(u Upstream) http.HandlerFunc
NewReverseProxy creates a reverse proxy for the existing service
Types ¶
type CronService ¶
type CronService struct {
// contains filtered or unexported fields
}
func NewCronService ¶
func NewCronService() *CronService
type DefaultUpstream ¶
type DefaultUpstream struct { sync.RWMutex Versions map[string]HTTPProcess Default *string }
func (*DefaultUpstream) GetDefault ¶
func (u *DefaultUpstream) GetDefault() (string, error)
GetDefault an upstream server for a service version
func (*DefaultUpstream) NextPort ¶
func (u *DefaultUpstream) NextPort() (string, error)
Next provides a port
func (*DefaultUpstream) Register ¶
func (u *DefaultUpstream) Register(name, version string, process HTTPProcess, def bool)
Register an upstream server for a service version
func (*DefaultUpstream) SetDefault ¶
func (u *DefaultUpstream) SetDefault(name, version string) error
SetDefault an upstream server for a service version
func (*DefaultUpstream) Unregister ¶
func (u *DefaultUpstream) Unregister(name, version string)
Unregister an upstream server for a service version
type GitServer ¶
type GitServer struct {
// contains filtered or unexported fields
}
func NewGitServer ¶
type HTTPListener ¶
type HTTPListener struct {
// contains filtered or unexported fields
}
func NewHTTPListener ¶
func NewHTTPListener() *HTTPListener
type HTTPProcess ¶
type SignalHandler ¶
type SignalHandler struct {
// contains filtered or unexported fields
}
func NewSignalHandler ¶
func NewSignalHandler() *SignalHandler
func (*SignalHandler) Run ¶
func (c *SignalHandler) Run(ctx context.Context, cancel context.CancelFunc) error
type StateMachine ¶
type StateMachine struct {
// contains filtered or unexported fields
}
func NewStateMachine ¶
func NewStateMachine() *StateMachine
type StoreService ¶
type StoreService struct {
// contains filtered or unexported fields
}
func NewStoreService ¶
func NewStoreService(workspace string) *StoreService
type Upstream ¶
type Upstream interface { Register(string, string, HTTPProcess, bool) SetDefault(string, string) error GetDefault() (string, error) Unregister(string, string) Lookup(string) (string, *exec.Cmd, error) NextPort() (string, error) }
Upstreamer the backend registration interface
func NewUpstream ¶
func NewUpstream() Upstream
Click to show internal directories.
Click to hide internal directories.