Documentation
¶
Index ¶
- Constants
- func ActiveNamespace() string
- func GetKServiceLogs(ctx context.Context, namespace, kServiceName, image string, since *time.Time, ...) error
- func NewEventingClient(namespace string) (clienteventingv1.KnEventingClient, error)
- func NewServingClient(namespace string) (clientservingv1.KnServingClient, error)
- type DeployDecorator
- type Deployer
- type DeployerOpt
- type Describer
- type Lister
- type Remover
- type SynchronizedBuffer
Constants ¶
const ( DefaultWaitingTimeout = 120 * time.Second DefaultErrorWindowTimeout = 2 * time.Second )
const ( DaprEnabled = "true" DaprMetricsPort = "9092" DaprEnableAPILogging = "true" )
const LIVENESS_ENDPOINT = "/health/liveness"
const READINESS_ENDPOINT = "/health/readiness"
const RemoveTimeout = 120 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ActiveNamespace ¶ added in v0.41.0
func ActiveNamespace() string
ActiveNamespace attempts to read the Kubernetes active namespace. Missing configs or not having an active Kubernetes configuration are equivalent to having no default namespace (empty string).
func GetKServiceLogs ¶
func GetKServiceLogs(ctx context.Context, namespace, kServiceName, image string, since *time.Time, out io.Writer) error
GetKServiceLogs will get logs of Knative service.
It will do so by gathering logs of user-container of all affiliated pods. In addition, filtering on image can be done so only logs for given image are logged. The image must be the digest format since pods of Knative service use it.
This function runs as long as the passed context is active (i.e. it is required cancel the context to stop log gathering).
func NewEventingClient ¶
func NewEventingClient(namespace string) (clienteventingv1.KnEventingClient, error)
func NewServingClient ¶
func NewServingClient(namespace string) (clientservingv1.KnServingClient, error)
Types ¶
type DeployDecorator ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
func NewDeployer ¶
func NewDeployer(opts ...DeployerOpt) *Deployer
type DeployerOpt ¶
type DeployerOpt func(*Deployer)
func WithDeployerDecorator ¶
func WithDeployerDecorator(decorator DeployDecorator) DeployerOpt
func WithDeployerVerbose ¶
func WithDeployerVerbose(verbose bool) DeployerOpt
type Describer ¶
type Describer struct {
// contains filtered or unexported fields
}
func NewDescriber ¶
func (*Describer) Describe ¶
func (d *Describer) Describe(ctx context.Context, name, namespace string) (description fn.Instance, err error)
Describe a function by name. Note that the consuming API uses domain style notation, whereas Kubernetes restricts to label-syntax, which is thus escaped. Therefore as a knative (kube) implementation detal proper full names have to be escaped on the way in and unescaped on the way out. ex: www.example-site.com -> www-example--site-com
type SynchronizedBuffer ¶
type SynchronizedBuffer struct {
// contains filtered or unexported fields
}
func (*SynchronizedBuffer) Reset ¶
func (b *SynchronizedBuffer) Reset()
func (*SynchronizedBuffer) String ¶
func (b *SynchronizedBuffer) String() string