monetizeapi

package
v0.8.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Group   = "obol.org"
	Version = "v1alpha1"

	ServiceOfferKind        = "ServiceOffer"
	RegistrationRequestKind = "RegistrationRequest"

	ServiceOfferResource        = "serviceoffers"
	RegistrationRequestResource = "registrationrequests"

	PausedAnnotation = "obol.org/paused"
)

Variables

View Source
var (
	ServiceOfferGVR        = schema.GroupVersionResource{Group: Group, Version: Version, Resource: ServiceOfferResource}
	RegistrationRequestGVR = schema.GroupVersionResource{Group: Group, Version: Version, Resource: RegistrationRequestResource}

	ServiceGVR    = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "services"}
	SecretGVR     = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
	ConfigMapGVR  = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
	DeploymentGVR = schema.GroupVersionResource{Group: "apps", Version: "v1", Resource: "deployments"}
	MiddlewareGVR = schema.GroupVersionResource{Group: "traefik.io", Version: "v1alpha1", Resource: "middlewares"}
	HTTPRouteGVR  = schema.GroupVersionResource{Group: "gateway.networking.k8s.io", Version: "v1", Resource: "httproutes"}
)

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Type               string      `json:"type"`
	Status             string      `json:"status"`
	Reason             string      `json:"reason,omitempty"`
	Message            string      `json:"message,omitempty"`
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

type RegistrationRequest

type RegistrationRequest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              RegistrationRequestSpec   `json:"spec,omitempty"`
	Status            RegistrationRequestStatus `json:"status,omitempty"`
}

type RegistrationRequestSpec

type RegistrationRequestSpec struct {
	ServiceOfferName      string `json:"serviceOfferName,omitempty"`
	ServiceOfferNamespace string `json:"serviceOfferNamespace,omitempty"`
	DesiredState          string `json:"desiredState,omitempty"`
}

type RegistrationRequestStatus

type RegistrationRequestStatus struct {
	Phase                       string `json:"phase,omitempty"`
	Message                     string `json:"message,omitempty"`
	PublishedURL                string `json:"publishedUrl,omitempty"`
	AgentID                     string `json:"agentId,omitempty"`
	RegistrationTxHash          string `json:"registrationTxHash,omitempty"`
	RegistrationOwner           string `json:"registrationOwner,omitempty"`
	RegistrationURI             string `json:"registrationUri,omitempty"`
	RegistrationSearchFromBlock int64  `json:"registrationSearchFromBlock,omitempty"`
	MetadataSynced              bool   `json:"metadataSynced,omitempty"`
}

type ServiceOffer

type ServiceOffer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ServiceOfferSpec   `json:"spec,omitempty"`
	Status            ServiceOfferStatus `json:"status,omitempty"`
}

func (*ServiceOffer) EffectiveHealthPath

func (o *ServiceOffer) EffectiveHealthPath() string

func (*ServiceOffer) EffectiveNamespace

func (o *ServiceOffer) EffectiveNamespace() string

func (*ServiceOffer) EffectivePath

func (o *ServiceOffer) EffectivePath() string

func (*ServiceOffer) EffectivePort

func (o *ServiceOffer) EffectivePort() int64

func (*ServiceOffer) IsInference

func (o *ServiceOffer) IsInference() bool

func (*ServiceOffer) IsPaused

func (o *ServiceOffer) IsPaused() bool

type ServiceOfferModel

type ServiceOfferModel struct {
	Name    string `json:"name,omitempty"`
	Runtime string `json:"runtime,omitempty"`
}

type ServiceOfferPayment

type ServiceOfferPayment struct {
	Scheme            string                 `json:"scheme,omitempty"`
	Network           string                 `json:"network,omitempty"`
	PayTo             string                 `json:"payTo,omitempty"`
	MaxTimeoutSeconds int64                  `json:"maxTimeoutSeconds,omitempty"`
	Price             ServiceOfferPriceTable `json:"price,omitempty"`
}

type ServiceOfferPriceTable

type ServiceOfferPriceTable struct {
	PerRequest string `json:"perRequest,omitempty"`
	PerMTok    string `json:"perMTok,omitempty"`
	PerHour    string `json:"perHour,omitempty"`
	PerEpoch   string `json:"perEpoch,omitempty"`
}

type ServiceOfferRegistration

type ServiceOfferRegistration struct {
	Enabled        bool                  `json:"enabled,omitempty"`
	Name           string                `json:"name,omitempty"`
	Description    string                `json:"description,omitempty"`
	Image          string                `json:"image,omitempty"`
	Services       []ServiceOfferService `json:"services,omitempty"`
	SupportedTrust []string              `json:"supportedTrust,omitempty"`
	Skills         []string              `json:"skills,omitempty"`
	Domains        []string              `json:"domains,omitempty"`
	Metadata       map[string]string     `json:"metadata,omitempty"`
}

type ServiceOfferService

type ServiceOfferService struct {
	Name     string `json:"name,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
	Version  string `json:"version,omitempty"`
}

type ServiceOfferSpec

type ServiceOfferSpec struct {
	Type         string                   `json:"type,omitempty"`
	Model        ServiceOfferModel        `json:"model,omitempty"`
	Upstream     ServiceOfferUpstream     `json:"upstream,omitempty"`
	Payment      ServiceOfferPayment      `json:"payment,omitempty"`
	Path         string                   `json:"path,omitempty"`
	Provenance   map[string]string        `json:"provenance,omitempty"`
	Registration ServiceOfferRegistration `json:"registration,omitempty"`
}

type ServiceOfferStatus

type ServiceOfferStatus struct {
	Conditions         []Condition `json:"conditions,omitempty"`
	Endpoint           string      `json:"endpoint,omitempty"`
	AgentID            string      `json:"agentId,omitempty"`
	RegistrationTxHash string      `json:"registrationTxHash,omitempty"`
	ObservedGeneration int64       `json:"observedGeneration,omitempty"`
}

type ServiceOfferUpstream

type ServiceOfferUpstream struct {
	Service    string `json:"service,omitempty"`
	Namespace  string `json:"namespace,omitempty"`
	Port       int64  `json:"port,omitempty"`
	HealthPath string `json:"healthPath,omitempty"`
}

Jump to

Keyboard shortcuts

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