Documentation ¶
Index ¶
- Variables
- func NewIngressWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*netv1.Ingress]
- func NewLoaderContext(ctx context.Context, ...) context.Context
- func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*nais_io_v1alpha1.Application]
- func Restart(ctx context.Context, teamSlug slug.Slug, environmentName, name string) error
- func Search(ctx context.Context, q string) ([]*search.Result, error)
- type Application
- func Get(ctx context.Context, teamSlug slug.Slug, environment, name string) (*Application, error)
- func GetByIdent(ctx context.Context, id ident.Ident) (*Application, error)
- func ListAllForTeam(ctx context.Context, teamSlug slug.Slug) []*Application
- func ListAllForTeamInEnvironment(ctx context.Context, teamSlug slug.Slug, environmentName string) []*Application
- type ApplicationConnection
- type ApplicationDeletedActivityLogEntry
- type ApplicationEdge
- type ApplicationInstance
- type ApplicationInstanceConnection
- type ApplicationInstanceEdge
- type ApplicationInstanceState
- type ApplicationInstanceStatus
- type ApplicationManifest
- type ApplicationOrder
- type ApplicationOrderField
- type ApplicationResources
- type ApplicationRestartedActivityLogEntry
- type ApplicationScaling
- type CPUScalingStrategy
- type DeleteApplicationInput
- type DeleteApplicationPayload
- type Ingress
- type IngressType
- type KafkaLagScalingStrategy
- type RestartApplicationInput
- type RestartApplicationPayload
- type ScalingStrategy
- type TeamApplicationsFilter
- type TeamInventoryCountApplications
Constants ¶
This section is empty.
Variables ¶
View Source
var AllApplicationInstanceState = []ApplicationInstanceState{ ApplicationInstanceStateRunning, ApplicationInstanceStateFailing, ApplicationInstanceStateUnknown, }
View Source
var AllApplicationOrderField = []ApplicationOrderField{ ApplicationOrderFieldName, ApplicationOrderFieldEnvironment, }
View Source
var AllIngressType = []IngressType{ IngressTypeUnknown, IngressTypeExternal, IngressTypeInternal, IngressTypeAuthenticated, }
View Source
var SortFilter = sortfilter.New[*Application, ApplicationOrderField, *TeamApplicationsFilter](ApplicationOrderFieldName)
Functions ¶
func NewIngressWatcher ¶
func NewLoaderContext ¶
func NewWatcher ¶
func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*nais_io_v1alpha1.Application]
Types ¶
type Application ¶
type Application struct { workload.Base Spec *nais_io_v1alpha1.ApplicationSpec `json:"-"` }
func GetByIdent ¶
func ListAllForTeam ¶
func ListAllForTeam(ctx context.Context, teamSlug slug.Slug) []*Application
func (*Application) GetSecrets ¶
func (a *Application) GetSecrets() []string
GetSecrets returns a list of secret names used by the application
func (Application) ID ¶
func (a Application) ID() ident.Ident
func (*Application) Ingresses ¶
func (a *Application) Ingresses() []*Ingress
func (Application) IsNode ¶
func (Application) IsNode()
func (Application) IsSearchNode ¶
func (Application) IsSearchNode()
func (Application) IsWorkload ¶
func (Application) IsWorkload()
func (*Application) Resources ¶
func (a *Application) Resources() *ApplicationResources
type ApplicationConnection ¶
type ApplicationConnection = pagination.Connection[*Application]
type ApplicationDeletedActivityLogEntry ¶
type ApplicationDeletedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type ApplicationEdge ¶
type ApplicationEdge = pagination.Edge[*Application]
type ApplicationInstance ¶
type ApplicationInstance struct { Name string `json:"name"` Restarts int `json:"restarts"` Created time.Time `json:"created"` ImageString string `json:"-"` EnvironmentName string `json:"-"` TeamSlug slug.Slug `json:"-"` ApplicationName string `json:"-"` ApplicationContainerStatus corev1.ContainerStatus `json:"-"` }
func ListAllInstances ¶
func (ApplicationInstance) ID ¶
func (i ApplicationInstance) ID() ident.Ident
func (ApplicationInstance) Image ¶
func (i ApplicationInstance) Image() *workload.ContainerImage
func (ApplicationInstance) IsNode ¶
func (ApplicationInstance) IsNode()
func (*ApplicationInstance) State ¶
func (i *ApplicationInstance) State() ApplicationInstanceState
func (*ApplicationInstance) Status ¶
func (i *ApplicationInstance) Status() *ApplicationInstanceStatus
type ApplicationInstanceConnection ¶
type ApplicationInstanceConnection = pagination.Connection[*ApplicationInstance]
func ListInstances ¶
func ListInstances(ctx context.Context, teamSlug slug.Slug, environmentName, appName string, page *pagination.Pagination) (*ApplicationInstanceConnection, error)
type ApplicationInstanceEdge ¶
type ApplicationInstanceEdge = pagination.Edge[*ApplicationInstance]
type ApplicationInstanceState ¶
type ApplicationInstanceState string
const ( ApplicationInstanceStateRunning ApplicationInstanceState = "RUNNING" ApplicationInstanceStateFailing ApplicationInstanceState = "FAILING" ApplicationInstanceStateUnknown ApplicationInstanceState = "UNKNOWN" )
func (ApplicationInstanceState) IsValid ¶
func (e ApplicationInstanceState) IsValid() bool
func (ApplicationInstanceState) MarshalGQL ¶
func (e ApplicationInstanceState) MarshalGQL(w io.Writer)
func (ApplicationInstanceState) String ¶
func (e ApplicationInstanceState) String() string
func (*ApplicationInstanceState) UnmarshalGQL ¶
func (e *ApplicationInstanceState) UnmarshalGQL(v interface{}) error
type ApplicationInstanceStatus ¶
type ApplicationInstanceStatus struct { State ApplicationInstanceState `json:"state"` Message string `json:"message"` }
type ApplicationManifest ¶
type ApplicationManifest struct {
Content string `json:"content"`
}
func (ApplicationManifest) IsWorkloadManifest ¶
func (ApplicationManifest) IsWorkloadManifest()
type ApplicationOrder ¶
type ApplicationOrder struct { Field ApplicationOrderField `json:"field"` Direction model.OrderDirection `json:"direction"` }
type ApplicationOrderField ¶
type ApplicationOrderField string
const ( ApplicationOrderFieldName ApplicationOrderField = "NAME" ApplicationOrderFieldEnvironment ApplicationOrderField = "ENVIRONMENT" )
func (ApplicationOrderField) IsValid ¶
func (e ApplicationOrderField) IsValid() bool
func (ApplicationOrderField) MarshalGQL ¶
func (e ApplicationOrderField) MarshalGQL(w io.Writer)
func (ApplicationOrderField) String ¶
func (e ApplicationOrderField) String() string
func (*ApplicationOrderField) UnmarshalGQL ¶
func (e *ApplicationOrderField) UnmarshalGQL(v interface{}) error
type ApplicationResources ¶
type ApplicationResources struct { Limits *workload.WorkloadResourceQuantity `json:"limits"` Requests *workload.WorkloadResourceQuantity `json:"requests"` Scaling *ApplicationScaling `json:"scaling"` }
func (ApplicationResources) IsWorkloadResources ¶
func (ApplicationResources) IsWorkloadResources()
type ApplicationRestartedActivityLogEntry ¶
type ApplicationRestartedActivityLogEntry struct {
activitylog.GenericActivityLogEntry
}
type ApplicationScaling ¶
type ApplicationScaling struct { MinInstances int `json:"minInstances"` MaxInstances int `json:"maxInstances"` Strategies []ScalingStrategy `json:"strategies"` }
type CPUScalingStrategy ¶
type CPUScalingStrategy struct {
Threshold int `json:"threshold"`
}
func (CPUScalingStrategy) IsScalingStrategy ¶
func (CPUScalingStrategy) IsScalingStrategy()
type DeleteApplicationInput ¶
type IngressType ¶
type IngressType string
const ( IngressTypeUnknown IngressType = "UNKNOWN" IngressTypeExternal IngressType = "EXTERNAL" IngressTypeInternal IngressType = "INTERNAL" IngressTypeAuthenticated IngressType = "AUTHENTICATED" )
func GetIngressType ¶
func GetIngressType(ctx context.Context, ingress *Ingress) IngressType
func (IngressType) IsValid ¶
func (e IngressType) IsValid() bool
func (IngressType) MarshalGQL ¶
func (e IngressType) MarshalGQL(w io.Writer)
func (IngressType) String ¶
func (e IngressType) String() string
func (*IngressType) UnmarshalGQL ¶
func (e *IngressType) UnmarshalGQL(v interface{}) error
type KafkaLagScalingStrategy ¶
type KafkaLagScalingStrategy struct { Threshold int `json:"threshold"` ConsumerGroup string `json:"consumerGroup"` TopicName string `json:"topicName"` }
func (KafkaLagScalingStrategy) IsScalingStrategy ¶
func (KafkaLagScalingStrategy) IsScalingStrategy()
type RestartApplicationInput ¶
type ScalingStrategy ¶
type ScalingStrategy interface {
IsScalingStrategy()
}
type TeamApplicationsFilter ¶
type TeamApplicationsFilter struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.