jx: github.com/jenkins-x/jx/pkg/jxfactory Index | Files | Directories

package jxfactory

import "github.com/jenkins-x/jx/pkg/jxfactory"

Index

Package Files

factory.go interface.go

type Factory Uses

type Factory interface {
    // WithBearerToken creates a factory from a k8s bearer token
    WithBearerToken(token string) Factory

    // ImpersonateUser creates a factory with an impersonated users
    ImpersonateUser(user string) Factory

    // CreateKubeClient creates a new Kubernetes client
    CreateKubeClient() (kubernetes.Interface, string, error)

    // CreateKubeConfig creates the kubernetes configuration
    CreateKubeConfig() (*rest.Config, error)

    // CreateJXClient creates a new Kubernetes client for Jenkins X CRDs
    CreateJXClient() (versioned.Interface, string, error)

    // CreateTektonClient create a new Kubernetes client for Tekton resources
    CreateTektonClient() (tektonclient.Interface, string, error)

    // KubeConfig returns a Kuber instance to interact with the kube configuration.
    KubeConfig() kube.Kuber
}

Factory is the interface defined for Kubernetes, Jenkins X, and Tekton REST APIs go:generate pegomock generate github.com/jenkins-x/jx/pkg/jxfactory Factory -o mocks/factory.go

func NewFactory Uses

func NewFactory() Factory

NewFactory creates a factory with the default Kubernetes resources defined if optionalClientConfig is nil, then flags will be bound to a new clientcmd.ClientConfig. if optionalClientConfig is not nil, then this factory will make use of it.

Directories

PathSynopsis
connector
connector/gcp
connector/provider
mocks

Package jxfactory imports 14 packages (graph) and is imported by 9 packages. Updated 2019-11-13. Refresh now. Tools for package owners.