Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectivityTest(clientName, hostPort string) bool
- func ErrDeployController(err error) error
- func ErrGetControllerEndpointForPort(err error) error
- func ErrGetControllerPublicEndpoint(err error) error
- func ErrGetControllerStatus(err error) error
- func GetBrokerEndpoint(kclient *mesherykube.Client, broker *v1alpha1.Broker) string
- type Connections
- type IMesheryController
- type MesheryControllerStatus
- type OperatorDeploymentConfig
Constants ¶
View Source
const ( MeshSync = "meshsync" MesheryBroker = "meshery-broker" MesheryServer = "meshery-server" )
View Source
const BrokerPingEndpoint = "/connz"
Variables ¶
View Source
var ( ErrGetControllerStatusCode = "meshkit-11141" ErrDeployControllerCode = "meshkit-11142" ErrGetControllerPublicEndpointCode = "meshkit-11143" ErrGetControllerEndpointForPortCode = "meshkit-11319" )
Functions ¶
func ConnectivityTest ¶
func ErrDeployController ¶
func ErrGetControllerEndpointForPort ¶ added in v0.8.37
func ErrGetControllerStatus ¶
func GetBrokerEndpoint ¶
func GetBrokerEndpoint(kclient *mesherykube.Client, broker *v1alpha1.Broker) string
GetBrokerEndpoint resolves the best reachable broker endpoint from the Broker CRD status. Candidates are probed in the order Meshery is commonly deployed relative to the cluster:
- internal — Meshery running in-cluster (ClusterIP)
- external — Meshery out-of-cluster, broker exposed (NodePort/LB)
- host.docker.internal — Meshery in Docker Desktop reaching the host
- API-server host — reuse the kube API host with the broker port (e.g. a port-forwarded 127.0.0.1:<port>)
Newer operators deploy NATS via the upstream Helm chart as a ClusterIP-only Service, so Status.Endpoint.External is empty. The old implementation unconditionally indexed strings.Split(External, ":")[1], panicking on that empty value; it also fell back to the internal (unreachable) endpoint even when a host.docker.internal / API-host path was reachable. This resolves both.
Types ¶
type Connections ¶
type Connections struct {
Connections []connection `json:"connections"`
}
type IMesheryController ¶
type IMesheryController interface {
GetName() string
GetStatus() MesheryControllerStatus
Deploy(force bool) error //If force is set to false && controller is in "Undeployed", then Deployment will be skipped. Set force=true for explicit install.
Undeploy() error
GetPublicEndpoint() (string, error)
GetVersion() (string, error)
GetEndpointForPort(portName string) (string, error)
}
func NewMesheryBrokerHandler ¶
func NewMesheryBrokerHandler(kubernetesClient *mesherykube.Client) IMesheryController
func NewMesheryOperatorHandler ¶
func NewMesheryOperatorHandler(client *mesherykube.Client, deploymentConf OperatorDeploymentConfig) IMesheryController
func NewMeshsyncHandler ¶
func NewMeshsyncHandler(kubernetesClient *mesherykube.Client) IMesheryController
type MesheryControllerStatus ¶
type MesheryControllerStatus int
const ( Deployed MesheryControllerStatus = iota //The controller is deployed(default behavior) Deploying //The controller is being deployed NotDeployed //The controller is not deployed yet Undeployed //The controller has been intentionally undeployed. This state is useful to avoid automatic redeployment. // we don't know since we have not checked yet Enabled Running Connected Unknown )
func (MesheryControllerStatus) String ¶
func (mcs MesheryControllerStatus) String() string
Click to show internal directories.
Click to hide internal directories.