api

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPublicAPI

func RegisterPublicAPI(router *gin.RouterGroup)

Types

type APIService

type APIService struct {
	HTTPPort   dashboardserver.ListenPort `json:"http_port,omitempty"`
	HTTPListen dashboardserver.ListenType `json:"http_listen,omitempty"`

	HTTPSHost string `json:"https_host,omitempty"`
	HTTPSPort string `json:"https_port,omitempty"`

	// Status tracking for the API service.
	Status    string     `json:"status"`
	StartedAt *time.Time `json:"started_at,omitempty"`
	StoppedAt *time.Time `json:"stopped_at,omitempty"`
	// contains filtered or unexported fields
}

APIService represents the API service.

func NewAPIService

func NewAPIService(ctx context.Context, opts ...APIServiceOption) (*APIService, error)

NewAPIService creates a new APIService.

func (*APIService) Start

func (api *APIService) Start() error

Start starts services managed by the Manager.

type APIServiceOption

type APIServiceOption func(*APIService) error

APIServiceOption defines a type of function to configures the APIService.

func WithHTTPPortAndListenConfig added in v1.2.7

func WithHTTPPortAndListenConfig(listenPort dashboardserver.ListenPort, listenType dashboardserver.ListenType) APIServiceOption

WithHTTPPortAndListenConfig sets the HTTP port and listen type for the API service.

func WithWebSocket

func WithWebSocket(webSocket *melody.Melody) APIServiceOption

func WithWorkspace

func WithWorkspace(workspace *pworkspace.PowerpipeWorkspace) APIServiceOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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