Documentation ¶
Overview ¶
Package rest Kubernikus
Schemes: http Host: localhost BasePath: / Version: 1.0.0 Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- func Configure(api *operations.KubernikusAPI, rt *apipkg.Runtime) error
- func NewKubeClients(logger kitlog.Logger) (kubernikus_clientset.Interface, kubernetes_clientset.Interface, error)
- type Server
- func (s *Server) ConfigureAPI()
- func (s *Server) ConfigureFlags()
- func (s *Server) Fatalf(f string, args ...interface{})
- func (s *Server) GetHandler() http.Handler
- func (s *Server) HTTPListener() (net.Listener, error)
- func (s *Server) Listen() error
- func (s *Server) Logf(f string, args ...interface{})
- func (s *Server) Serve() (err error)
- func (s *Server) SetAPI(api *operations.KubernikusAPI)
- func (s *Server) SetHandler(handler http.Handler)
- func (s *Server) Shutdown() error
- func (s *Server) TLSListener() (net.Listener, error)
- func (s *Server) UnixListener() (net.Listener, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶ added in v1.2.0
func Configure(api *operations.KubernikusAPI, rt *apipkg.Runtime) error
func NewKubeClients ¶
func NewKubeClients(logger kitlog.Logger) (kubernikus_clientset.Interface, kubernetes_clientset.Interface, error)
Types ¶
type Server ¶
type Server struct { EnabledListeners []string CleanupTimeout time.Duration MaxHeaderSize flagext.ByteSize SocketPath string Host string Port int ListenLimit int KeepAlive time.Duration ReadTimeout time.Duration WriteTimeout time.Duration TLSHost string TLSPort int TLSCertificate string TLSCertificateKey string TLSCACertificate string TLSListenLimit int TLSKeepAlive time.Duration TLSReadTimeout time.Duration TLSWriteTimeout time.Duration // contains filtered or unexported fields }
Server for the kubernikus API
func NewServer ¶
func NewServer(api *operations.KubernikusAPI) *Server
NewServer creates a new api kubernikus server but does not configure it
func (*Server) ConfigureAPI ¶
func (s *Server) ConfigureAPI()
ConfigureAPI configures the API and handlers.
func (*Server) ConfigureFlags ¶
func (s *Server) ConfigureFlags()
ConfigureFlags configures the additional flags defined by the handlers. Needs to be called before the parser.Parse
func (*Server) Fatalf ¶
Fatalf logs message either via defined user logger or via system one if no user logger is defined. Exits with non-zero status after printing
func (*Server) GetHandler ¶
GetHandler returns a handler useful for testing
func (*Server) HTTPListener ¶
HTTPListener returns the http listener
func (*Server) Logf ¶
Logf logs message either via defined user logger or via system one if no user logger is defined.
func (*Server) SetAPI ¶
func (s *Server) SetAPI(api *operations.KubernikusAPI)
SetAPI configures the server with the specified API. Needs to be called before Serve
func (*Server) SetHandler ¶
SetHandler allows for setting a http handler on this server
func (*Server) TLSListener ¶
TLSListener returns the https listener