model

package
v0.13.0-alpha.177 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	Digest   string `json:"digest"`
	Progress int64  `json:"progress"`
	Size     int64  `json:"size"`
	Error    string `json:"error,omitempty"`
}

type Message

type Message struct {
	MessageID     int64
	Content       string
	Lease         string
	Priority      int
	Status        MessageStatus
	Data          MessageAttr
	LastHeartbeat time.Time
}

type MessageAttr

type MessageAttr struct {
	Error string `json:"error,omitempty"`

	Host     string `json:"host,omitempty"`
	Image    string `json:"image,omitempty"`
	Progress int64  `json:"progress,omitempty"`
	Size     int64  `json:"size,omitempty"`

	Spec []byte `json:"spec,omitempty"`

	// Deprecate
	Blobs []Blob `json:"blobs,omitempty"`
}

func (*MessageAttr) Scan

func (n *MessageAttr) Scan(value any) error

func (MessageAttr) Value

func (n MessageAttr) Value() (driver.Value, error)

type MessageStatus

type MessageStatus uint64
const (
	StatusPending    MessageStatus = 0
	StatusProcessing MessageStatus = 10
	StatusCompleted  MessageStatus = 20
	StatusFailed     MessageStatus = 30
	StatusCleanup    MessageStatus = 90
)

Jump to

Keyboard shortcuts

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