types

package
v0.0.0-...-8396750 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Runtimes = map[string]bool{
	"js": true,
	"go": true,
}

Functions

func ValidRuntime

func ValidRuntime(runtime string) bool

Types

type Deployment

type Deployment struct {
	ID         uuid.UUID `json:"id"`
	EndpointID uuid.UUID `json:"endpoint_id"`
	Hash       string    `json:"hash"`
	Blob       []byte    `json:"-"`
	CreatedAT  time.Time `json:"created_at"`
}

func NewDeployment

func NewDeployment(endpoint *Endpoint, blob []byte) *Deployment

type DeploymentHistory

type DeploymentHistory struct {
	ID        uuid.UUID `json:"id"`
	CreatedAT time.Time `json:"created_at"`
}

type Endpoint

type Endpoint struct {
	ID                 uuid.UUID            `json:"id"`
	Name               string               `json:"name"`
	Runtime            string               `json:"runtime"`
	ActiveDeploymentID uuid.UUID            `json:"active_deployment_id"`
	Environment        map[string]string    `json:"environment"`
	DeploymentHistory  []*DeploymentHistory `json:"deployment_history"`
	CreatedAT          time.Time            `json:"created_at"`
}

func NewEndpoint

func NewEndpoint(name string, runtime string, env map[string]string) *Endpoint

func (Endpoint) HasActiveDeploy

func (e Endpoint) HasActiveDeploy() bool

type RequestMetric

type RequestMetric struct {
	ID           uuid.UUID     `json:"id"`
	EndpointID   uuid.UUID     `json:"endpoint_id"`
	DeploymentID uuid.UUID     `json:"deployment_id"`
	RequestURL   string        `json:"request_url"`
	Duration     time.Duration `json:"duration"`
	StatusCode   int           `json:"status_code"`
}

RequestMetric holds information about a single HTTP request invoked by the runtime.

type RuntimeLogEvent

type RuntimeLogEvent struct {
	Data []byte
}

RuntimeLogEvent holds the logs that where written out during runtime invocation of a script.

type RuntimeMetric

type RuntimeMetric struct {
	ID     uuid.UUID     `json:"id"`
	Uptime time.Duration `json:"uptime"`
}

Jump to

Keyboard shortcuts

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