httphandler

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
}

Config represent HTTP Service configurations

type Service

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

Service represent HTTP service

func New

func New(ctx context.Context, cfg *Config,
	wpService *_wpservice.Service,
	httpService *_http.Service) (*Service, error)

New create new HTTP service

func (*Service) HealthHandler

func (s *Service) HealthHandler(w http.ResponseWriter, r *http.Request)

HealthHandler handle to livenessProbe

func (*Service) ReadyHandler

func (s *Service) ReadyHandler(w http.ResponseWriter, r *http.Request)

ReadyHandler handle to readinessProbe

func (*Service) WpHandlerFactorial

func (s *Service) WpHandlerFactorial(w http.ResponseWriter, r *http.Request)

WpHandlerFactorial handle worker pool

type WpFactorialReqResp

type WpFactorialReqResp struct {
	NumArray     *[]uint64 `json:"num_array,omitempty"`
	SumFactorial uint64    `json:"sum_factorial,omitempty"`
	Duration     string    `json:"duration,omitempty"`
}

Jump to

Keyboard shortcuts

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