Documentation ¶
Index ¶
- Constants
- func GenericAPIServer(port int, cfg *config.Config) manager.Runnable
- func MockAPIServer(port int) manager.Runnable
- func SetupProfiling(r *gin.Engine)
- func StaticFileServer(port int, cfg *config.Config) manager.Runnable
- type Event
- type PostServer
- func (s *PostServer) InjectConfig(cfg *config.Config)
- func (s *PostServer) InjectController(c lifecycle.Controller)
- func (s *PostServer) InjectEventRecorder(er record.EventRecorder)
- func (s *PostServer) InjectReader(reader client.Reader)
- func (s *PostServer) SaveFile(executionID, name string, data []byte) (string, error)
- type Server
Constants ¶
View Source
const ( // CallbackBasePath callback path CallbackBasePath = "/report/:node/:executionID" // CallbackBaseResultSubPath result sub path CallbackBaseResultSubPath = "/result" // CallbackBaseFileSubPath file sub path CallbackBaseFileSubPath = "/file" // CallbackBaseEventSubPath event sub path CallbackBaseEventSubPath = "/event" // FileName query parameter name FileName = "name" )
Variables ¶
This section is empty.
Functions ¶
func GenericAPIServer ¶
GenericAPIServer prepare the generic api server
func MockAPIServer ¶ added in v1.2.2
MockAPIServer prepare the mock api server
Types ¶
type Event ¶ added in v1.0.0
type Event struct { Waring bool `json:"warning"` Reason string `json:"reason" validate:"required,first_char_must_be_uppercase"` Message string `json:"message,omitempty" validate:"required"` Args []string `json:"args,omitempty"` }
Event to be sent as k8s event
type PostServer ¶
type PostServer struct { Server Controller lifecycle.Controller ReportPath string DevMode bool EventRecorder record.EventRecorder Config *config.Config Client client.Reader }
PostServer post server
func (*PostServer) InjectConfig ¶ added in v1.0.0
func (s *PostServer) InjectConfig(cfg *config.Config)
InjectConfig inject the config
func (*PostServer) InjectController ¶ added in v1.0.6
func (s *PostServer) InjectController(c lifecycle.Controller)
InjectController inject the controller
func (*PostServer) InjectEventRecorder ¶ added in v1.0.0
func (s *PostServer) InjectEventRecorder(er record.EventRecorder)
InjectEventRecorder inject the event recorder
func (*PostServer) InjectReader ¶ added in v1.0.0
func (s *PostServer) InjectReader(reader client.Reader)
InjectReader inject the client reader
Click to show internal directories.
Click to hide internal directories.