http

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

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

func GenericAPIServer(port int, cfg *config.Config) manager.Runnable

GenericAPIServer prepare the generic api server

func MockAPIServer added in v1.2.2

func MockAPIServer(port int) manager.Runnable

MockAPIServer prepare the mock api server

func SetupProfiling

func SetupProfiling(r *gin.Engine)

SetupProfiling setup profiling

func StaticFileServer

func StaticFileServer(port int, cfg *config.Config) manager.Runnable

StaticFileServer prepare the static file 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

func (*Event) Type added in v1.0.0

func (e *Event) Type() string

Type get the warning type

func (*Event) Validate added in v1.0.0

func (e *Event) Validate() error

Validate the event

type PostServer

type PostServer struct {
	*Server
	Controller    lifecycle.Controller
	Config        *config.Config
	EventRecorder record.EventRecorder
	Client        client.Reader
}

PostServer post server

func (*PostServer) HealthzCheck added in v1.4.0

func (s *PostServer) HealthzCheck() healthz.Checker

HealthzCheck check if server is running

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

func (*PostServer) Name added in v1.4.0

func (s *PostServer) Name() string

Name the name of the server

func (*PostServer) ReadyzCheck added in v1.4.0

func (s *PostServer) ReadyzCheck() healthz.Checker

ReadyzCheck check if server is running

func (*PostServer) SaveFile

func (s *PostServer) SaveFile(executionID, name string, data []byte) (string, error)

SaveFile save a received file

type Server

type Server struct {
	Port    int
	Kind    string
	Handler http.Handler
	Log     logr.Logger
	Config  *config.Config
}

Server default server

func (*Server) HealthzCheck added in v1.4.0

func (s *Server) HealthzCheck() healthz.Checker

HealthzCheck check if server is running

func (*Server) Name added in v1.4.0

func (s *Server) Name() string

Name the name of the server

func (*Server) ReadyzCheck added in v1.4.0

func (s *Server) ReadyzCheck() healthz.Checker

ReadyzCheck check if server is running

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start the server

Jump to

Keyboard shortcuts

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