Documentation
¶
Index ¶
- Constants
- func DefaultNamespace() 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 DefaultNamespace ¶
func DefaultNamespace() string
DefaultNamespace attempts to read the kubernetes active namepsace. Missing configs or not having an active kuberentes 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 { // Namespace with which to override that set on the default configuration (such as the ~/.kube/config). // If left blank, deployment will commence to the configured namespace. Namespace string // 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 WithDeployerNamespace ¶
func WithDeployerNamespace(namespace string) DeployerOpt
func WithDeployerVerbose ¶
func WithDeployerVerbose(verbose bool) DeployerOpt
type Describer ¶
type Describer struct {
// contains filtered or unexported fields
}
func NewDescriber ¶
func (*Describer) Describe ¶
Describe 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 Remover ¶
type Remover struct { Namespace string // contains filtered or unexported fields }
func NewRemover ¶
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