Documentation
¶
Index ¶
- func NewSpaceappAppService(repo repository.SpaceAppRepository, spaceRepo spacerepo.Project, ...) *spaceappAppService
- type BuildLogsDTO
- type CmdToCreateApp
- type CmdToNotifyBuildIsStarted
- type CmdToNotifyFailedStatus
- type CmdToNotifyServiceIsStarted
- type CmdToNotifyStarting
- type GetSpaceAppCmd
- type InferenceCreateCmd
- type InferenceDTO
- type InferenceDetail
- type InferenceIndex
- type InferenceInternalService
- type InferenceMessageService
- type InferenceService
- type SpaceAppDTO
- type SpaceappAppService
- type UnavailableRepoFileError
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 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
type SpaceappAppService interface {
GetByName(context.Context, domain.Account, *spacedomain.SpaceIndex) (SpaceAppDTO, error)
GetBuildLog(context.Context, domain.Account, *spacedomain.SpaceIndex) (string, error)
GetBuildLogs(context.Context, domain.Account, *spacedomain.SpaceIndex) (BuildLogsDTO, error)
GetRequestDataStream(*spaceappdomain.SeverSentStream) error
GetSpaceLog(context.Context, domain.Account, *spacedomain.SpaceIndex) (string, error)
CheckPermissionRead(context.Context, domain.Account, *spacedomain.SpaceIndex) error
}
SpaceappAppService is the interface for the space app service.
type UnavailableRepoFileError ¶
type UnavailableRepoFileError struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.