server

package
v0.50.0-beta-2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexReplacePlaceholder = `<!--INJECT GENERATED CODE HERE FROM BACKEND-->`

Functions

func CreateKHIServer

func CreateKHIServer(engine *gin.Engine, inspectionServer *coreinspection.InspectionTaskServer, serverConfig *ServerConfig) *gin.Engine

Types

type GetInspectionFeatureResponse

type GetInspectionFeatureResponse struct {
	Features []coreinspection.FeatureListItem `json:"features"`
}

type GetInspectionTypesResponse

type GetInspectionTypesResponse struct {
	Types []*coreinspection.InspectionType `json:"types"`
}

GetInspectionTypesResponse is the type of the response for /api/v3/inspection/types

type GetInspectionsResponse

type GetInspectionsResponse struct {
	Inspections map[string]SerializedMetadata `json:"inspections"`
	ServerStat  *ServerStat                   `json:"serverStat"`
}

GetInspectionsResponse is the type of the response for /api/v3/inspection

type PatchInspectionFeatureRequest

type PatchInspectionFeatureRequest struct {
	Features map[string]bool `json:"features"`
}

type PostInspectionDryRunRequest

type PostInspectionDryRunRequest = map[string]any

type PostInspectionResponse

type PostInspectionResponse struct {
	InspectionID string `json:"inspectionID"`
}

type PutInspectionFeatureRequest

type PutInspectionFeatureRequest struct {
	Features []string `json:"features"`
}

type PutInspectionFeatureResponse

type PutInspectionFeatureResponse struct {
}

type ResourceMonitor

type ResourceMonitor interface {
	GetUsedMemory() int
}

type ResourceMonitorImpl

type ResourceMonitorImpl struct {
}

func (*ResourceMonitorImpl) GetUsedMemory

func (r *ResourceMonitorImpl) GetUsedMemory() int

GetUsedMemory implements ResourceMonitor.

type ResourceMonitorMock

type ResourceMonitorMock struct {
	UsedMemory int
}

func (*ResourceMonitorMock) GetUsedMemory

func (r *ResourceMonitorMock) GetUsedMemory() int

GetUsedMemory implements ResourceMonitor.

type SerializedMetadata

type SerializedMetadata = map[string]any

type ServerConfig

type ServerConfig struct {
	ViewerMode       bool
	StaticFolderPath string
	ResourceMonitor  ResourceMonitor
	ServerBasePath   string
	UploadFileStore  *upload.UploadFileStore
}

type ServerFactory

type ServerFactory struct {
	Options []option.Option
	// contains filtered or unexported fields
}

ServerFactory is responsible for creating and configuring Gin engine instances.

var DefaultServerFactory *ServerFactory = &ServerFactory{}

DefaultServerFactory is the default instance of ServerFactory. This instance Options will be modified to extend the behavior of the gin server.

func (*ServerFactory) AddOptions

func (s *ServerFactory) AddOptions(opt ...option.Option)

AddOptions adds one or more Option instances to the factory's configuration.

func (*ServerFactory) CreateInstance

func (s *ServerFactory) CreateInstance(mode string) (*gin.Engine, error)

CreateInstance creates a new Gin engine and applies all registered options to it. It returns the configured Gin engine or an error if any option fails to apply.

type ServerStat

type ServerStat struct {
	TotalMemoryAvailable int `json:"totalMemoryAvailable"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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