Documentation ¶
Index ¶
- func CheckPodExists(client *k8s.Clientset, namespace string, labelSelector map[string]string, ...) (bool, string)
- func Client() (*k8s.Clientset, error)
- func DaprClient() (scheme.Interface, error)
- func Expiry() (*time.Time, error)
- func ExportTrustChain(outputDir string) error
- func GetDefaultConfiguration() v1alpha1.Configuration
- func GetKubeConfigClient() (*rest.Config, *k8s.Clientset, error)
- func Init(config InitConfiguration) error
- func IsMTLSEnabled() (bool, error)
- func ListPods(client *k8s.Clientset, namespace string, labelSelector map[string]string) (*core_v1.PodList, error)
- func Logs(appID, podName, namespace string) error
- func Uninstall(namespace string) error
- type ComponentsOutput
- type ConfigurtionsOutput
- type InitConfiguration
- type ListOutput
- type PortForward
- type RunConfig
- type RunOutput
- type StatusOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPodExists ¶ added in v0.9.0
func CheckPodExists(client *k8s.Clientset, namespace string, labelSelector map[string]string, deployName string) (bool, string)
CheckPodExists returns a boolean representing the pod's existence and the namespace that the given pod resides in, or empty if not present in the given namespace
func DaprClient ¶ added in v0.4.0
DaprClient returns a new Kubernetes Dapr client
func ExportTrustChain ¶ added in v0.10.0
ExportTrustChain takes the root cert, issuer cert and issuer key from a k8s cluster and saves them in a given directory
func GetDefaultConfiguration ¶ added in v0.4.1
func GetDefaultConfiguration() v1alpha1.Configuration
func GetKubeConfigClient ¶ added in v0.9.0
GetKubeConfigClient returns the kubeconfig and the client created from the kubeconfig
func Init ¶
func Init(config InitConfiguration) error
Init deploys the Dapr operator using the supplied runtime version.
func IsMTLSEnabled ¶ added in v0.4.0
Types ¶
type ComponentsOutput ¶ added in v0.4.0
type ComponentsOutput struct { Name string `csv:"Name"` Type string `csv:"Type"` Age string `csv:"AGE"` Created string `csv:"CREATED"` }
ComponentsOutput represent a Dapr component.
func Components ¶ added in v0.4.0
func Components() ([]ComponentsOutput, error)
List outputs all Dapr components.
type ConfigurtionsOutput ¶ added in v0.4.0
type ConfigurtionsOutput struct { Name string `csv:"Name"` TracingEnabled bool `csv:"TRACING-ENABLED"` MTLSEnabled bool `csv:"MTLS-ENABLED"` WorkloadCertTTL string `csv:"MTLS-WORKLOAD-TTL"` ClockSkew string `csv:"MTLS-CLOCK-SKEW"` Age string `csv:"AGE"` Created string `csv:"CREATED"` }
ComponentsOutput represent a Dapr component.
func Configurations ¶ added in v0.4.0
func Configurations() ([]ConfigurtionsOutput, error)
List outputs all Dapr configurations.
type InitConfiguration ¶ added in v0.10.0
type ListOutput ¶
type ListOutput struct { AppID string `csv:"APP ID"` AppPort string `csv:"APP PORT"` Age string `csv:"AGE"` Created string `csv:"CREATED"` }
ListOutput represents the application ID, application port and creation time.
type PortForward ¶ added in v0.9.0
type PortForward struct { Config *rest.Config Method string URL *url.URL Host string LocalPort int RemotePort int EmitLogs bool StopCh chan struct{} ReadyCh chan struct{} }
PortForward provides a port-forward connection in a kubernetes cluster.
func NewPortForward ¶ added in v0.9.0
func NewPortForward( config *rest.Config, namespace, deployName string, host string, localPort, remotePort int, emitLogs bool, ) (*PortForward, error)
NewPortForward returns an instance of PortForward struct that can be used for establishing port-forwarding connection to a pod in kubernetes cluster, specified by namespace and deployName.
func (*PortForward) GetStop ¶ added in v0.9.0
func (pf *PortForward) GetStop() <-chan struct{}
GetStop returns StopCh for a PortForward instance. Receiving on StopCh will block until the port forwarding stops.
func (*PortForward) Init ¶ added in v0.9.0
func (pf *PortForward) Init() error
Init creates and runs a port-forward connection. This function blocks until connection is established. Note: Caller should call Stop() to finish the connection.
func (*PortForward) Stop ¶ added in v0.9.0
func (pf *PortForward) Stop()
Stop terminates port-forwarding connection.
type RunConfig ¶
type RunConfig struct { AppID string AppPort int HTTPPort int GRPCPort int CodeDirectory string Arguments []string Image string }
RunConfig represents the application configuration parameters.
type StatusOutput ¶ added in v0.7.0
type StatusOutput struct { Name string `csv:"NAME"` Namespace string `csv:"NAMESPACE"` Healthy string `csv:"HEALTHY"` Status string `csv:"STATUS"` Version string `csv:"VERSION"` Age string `csv:"AGE"` Created string `csv:"CREATED"` }
StatusOutput represents the status of a named Dapr resource.