webservice

package
v0.0.0-...-c11a323 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppsResponse

type AppsResponse struct {
	Apps []*model.ApplicationDAOInfo `json:"apps"`
}

type NodesResponse

type NodesResponse struct {
	Nodes []*dao.NodeDAOInfo `json:"nodes"`
}

type PartitionsResponse

type PartitionsResponse struct {
	Partitions []*dao.PartitionInfo `json:"partitions"`
}

type ProblemDetails

type ProblemDetails struct {
	// Type is a URI reference that identifies the problem type.
	Type string `json:"type,omitempty"`
	// Title is a short, human-readable summary of the problem type.
	Title string `json:"title,omitempty"`
	// Status is the HTTP status code generated by the origin server for this occurrence of the problem.
	Status int `json:"status,omitempty"`
	// Detail is a human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`
	// Instance is a URI reference that identifies the specific occurrence of the problem.
	Instance string `json:"instance,omitempty"`
}

ProblemDetails represents the problem details as per RFC 7807

type QueuesResponse

type QueuesResponse struct {
	Queues []*model.PartitionQueueDAOInfo `json:"queues"`
}

type WebService

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

func NewWebService

func NewWebService(
	cfg *config.YHSConfig,
	repository repository2.Repository,
	eventRepository repository2.EventRepository,
	healthService health.Interface,
) *WebService

func (*WebService) LivenessHealthcheck

func (ws *WebService) LivenessHealthcheck(w http.ResponseWriter, r *http.Request)

func (*WebService) ReadinessHealthcheck

func (ws *WebService) ReadinessHealthcheck(w http.ResponseWriter, r *http.Request)

func (*WebService) Shutdown

func (ws *WebService) Shutdown(ctx context.Context) error

func (*WebService) Start

func (ws *WebService) Start(ctx context.Context) error

Start performs a blocking call to start the REST API server.

Jump to

Keyboard shortcuts

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