Documentation
¶
Index ¶
- type InternalAppService
- func (s *InternalAppService) Create(ctx context.Context, req *connect.Request[flyteapp.CreateRequest]) (*connect.Response[flyteapp.CreateResponse], error)
- func (s *InternalAppService) Delete(ctx context.Context, req *connect.Request[flyteapp.DeleteRequest]) (*connect.Response[flyteapp.DeleteResponse], error)
- func (s *InternalAppService) Get(ctx context.Context, req *connect.Request[flyteapp.GetRequest]) (*connect.Response[flyteapp.GetResponse], error)
- func (s *InternalAppService) List(ctx context.Context, req *connect.Request[flyteapp.ListRequest]) (*connect.Response[flyteapp.ListResponse], error)
- func (s *InternalAppService) Update(ctx context.Context, req *connect.Request[flyteapp.UpdateRequest]) (*connect.Response[flyteapp.UpdateResponse], error)
- func (s *InternalAppService) Watch(ctx context.Context, req *connect.Request[flyteapp.WatchRequest], ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InternalAppService ¶
type InternalAppService struct {
appconnect.UnimplementedAppServiceHandler
// contains filtered or unexported fields
}
InternalAppService is the data plane implementation of the AppService. It has direct K8s access via AppK8sClientInterface and no database dependency — all app state lives in KService CRDs.
func NewInternalAppService ¶
func NewInternalAppService(k8s appk8s.AppK8sClientInterface, cfg *appconfig.AppConfig) *InternalAppService
NewInternalAppService creates a new InternalAppService.
func (*InternalAppService) Create ¶
func (s *InternalAppService) Create( ctx context.Context, req *connect.Request[flyteapp.CreateRequest], ) (*connect.Response[flyteapp.CreateResponse], error)
Create deploys a new app as a KService CRD.
func (*InternalAppService) Delete ¶
func (s *InternalAppService) Delete( ctx context.Context, req *connect.Request[flyteapp.DeleteRequest], ) (*connect.Response[flyteapp.DeleteResponse], error)
Delete removes the KService CRD for the given app entirely.
func (*InternalAppService) Get ¶
func (s *InternalAppService) Get( ctx context.Context, req *connect.Request[flyteapp.GetRequest], ) (*connect.Response[flyteapp.GetResponse], error)
Get retrieves an app and its live status from the KService CRD. Note: App.Spec is not populated — status and ingress URL are the authoritative fields.
func (*InternalAppService) List ¶
func (s *InternalAppService) List( ctx context.Context, req *connect.Request[flyteapp.ListRequest], ) (*connect.Response[flyteapp.ListResponse], error)
List returns apps for the requested scope with pagination.
func (*InternalAppService) Update ¶
func (s *InternalAppService) Update( ctx context.Context, req *connect.Request[flyteapp.UpdateRequest], ) (*connect.Response[flyteapp.UpdateResponse], error)
Update modifies an app's spec or desired state. When Spec.DesiredState is STOPPED, the app is scaled to zero (KService kept). When Spec.DesiredState is STARTED or ACTIVE, the app is redeployed/resumed. Otherwise the spec update is applied and the app is redeployed.
func (*InternalAppService) Watch ¶
func (s *InternalAppService) Watch( ctx context.Context, req *connect.Request[flyteapp.WatchRequest], stream *connect.ServerStream[flyteapp.WatchResponse], ) error
Watch streams live KService events to the client. It first sends the current state as CreateEvents (initial snapshot), then streams changes.