app

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSpaceappAppService added in v1.5.0

func NewSpaceappAppService(
	repo repository.SpaceAppRepository,
	spaceRepo spacerepo.Project,
	sse spaceappdomain.SeverSentEvent,
	spacesender spacemesage.SpaceAppMessageProducer,
) *spaceappAppService

NewSpaceappAppService creates a new instance of the space app service.

Types

type BuildLogsDTO added in v1.5.0

type BuildLogsDTO struct {
	Logs string `json:"logs"`
}

BuildLogsDTO

type CmdToCreateApp added in v1.5.0

type CmdToCreateApp = domain.SpaceAppIndex

CmdToCreateApp is a command to create an app.

type CmdToNotifyBuildIsStarted added in v1.5.0

type CmdToNotifyBuildIsStarted struct {
	domain.SpaceAppIndex

	LogURL commondomain.URL
}

CmdToNotifyBuildIsStarted is a command to notify that the build has started.

type CmdToNotifyFailedStatus added in v1.5.0

type CmdToNotifyFailedStatus struct {
	domain.SpaceAppIndex

	Reason string
	Status domain.AppStatus

	Logs string
}

CmdToNotifyFailedStatus is a command to notify that status has update.

type CmdToNotifyServiceIsStarted added in v1.5.0

type CmdToNotifyServiceIsStarted struct {
	CmdToNotifyBuildIsStarted

	AppURL domain.AppURL
}

CmdToNotifyServiceIsStarted is a command to notify that the service has started.

type CmdToNotifyStarting added in v1.5.0

type CmdToNotifyStarting struct {
	domain.SpaceAppIndex

	Logs string
}

CmdToNotifyStarting is a command to notify that the build has finished.

type GetSpaceAppCmd added in v1.5.0

type GetSpaceAppCmd = spacedomain.SpaceIndex

type InferenceCreateCmd

type InferenceCreateCmd struct {
	ProjectId     string
	ProjectName   types.ResourceName
	ProjectOwner  types.Account
	ResourceLevel string

	InferenceDir types.Directory
	BootFile     types.FilePath
}

func (*InferenceCreateCmd) Validate

func (cmd *InferenceCreateCmd) Validate() error

type InferenceDTO

type InferenceDTO struct {
	Error      string `json:"error"`
	AccessURL  string `json:"access_url"`
	InstanceId string `json:"inference_id"`
}

type InferenceDetail

type InferenceDetail = domain.InferenceDetail

type InferenceIndex

type InferenceIndex = domain.InferenceIndex

type InferenceInternalService

type InferenceInternalService interface {
	UpdateDetail(*InferenceIndex, *InferenceDetail) error
}

func NewInferenceInternalService

func NewInferenceInternalService(repo spaceapprepo.Inference) InferenceInternalService

type InferenceMessageService

type InferenceMessageService interface {
	CreateInferenceInstance(*domain.InferenceInfo) error
	ExtendSurvivalTime(*message.InferenceExtendInfo) error
}

func NewInferenceMessageService

func NewInferenceMessageService(
	repo spaceapprepo.Inference,
	user userrepo.User,
	manager inference.Inference,
) InferenceMessageService

type InferenceService

type InferenceService interface {
	Create(context.Context, CmdToCreateApp) error
	Get(info *InferenceIndex) (InferenceDTO, error)
	NotifyIsServing(ctx context.Context, cmd *CmdToNotifyServiceIsStarted) error
	NotifyIsBuilding(ctx context.Context, cmd *CmdToNotifyBuildIsStarted) error
	NotifyStarting(ctx context.Context, cmd *CmdToNotifyStarting) error
	NotifyIsBuildFailed(ctx context.Context, cmd *CmdToNotifyFailedStatus) error
	NotifyIsStartFailed(ctx context.Context, cmd *CmdToNotifyFailedStatus) error
}

func NewInferenceService

func NewInferenceService(
	p platform.RepoFile,
	sender message.Sender,
	minSurvivalTime int,
	spacesender spacemesage.SpaceAppMessageProducer,
	spaceappRepo spaceapprepo.SpaceAppRepository,
	spaceRepo spacerepo.Project,
) InferenceService

type SpaceAppDTO added in v1.5.0

type SpaceAppDTO struct {
	Id          string `json:"id"`
	Status      string `json:"status"`
	Reason      string `json:"reason"`
	AppURL      string `json:"app_url"`
	AppLogURL   string `json:"-"`
	BuildLogURL string `json:"-"`
}

SpaceAppDTO is a data transfer object for space app.

type SpaceappAppService added in v1.5.0

SpaceappAppService is the interface for the space app service.

type UnavailableRepoFileError

type UnavailableRepoFileError struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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