open-vault/vendor/github.com/couchbase/gocb/v2/constants_str.go
Michael Golowka bd79fbafb3
Add couchbase, elasticsearch, and mongodbatlas back (#10222)
Updated the `Serve` function so these can be added back into Vault
2020-10-22 17:20:17 -06:00

58 lines
1.1 KiB
Go

package gocb
func serviceTypeToString(service ServiceType) string {
switch service {
case ServiceTypeManagement:
return "mgmt"
case ServiceTypeKeyValue:
return "kv"
case ServiceTypeViews:
return "views"
case ServiceTypeQuery:
return "query"
case ServiceTypeSearch:
return "search"
case ServiceTypeAnalytics:
return "analytics"
}
return ""
}
func clusterStateToString(state ClusterState) string {
switch state {
case ClusterStateOnline:
return "online"
case ClusterStateDegraded:
return "degraded"
case ClusterStateOffline:
return "offline"
}
return ""
}
func endpointStateToString(state EndpointState) string {
switch state {
case EndpointStateDisconnected:
return "disconnected"
case EndpointStateConnecting:
return "connecting"
case EndpointStateConnected:
return "connected"
case EndpointStateDisconnecting:
return "disconnecting"
}
return ""
}
func pingStateToString(state PingState) string {
switch state {
case PingStateOk:
return "ok"
case PingStateTimeout:
return "timeout"
case PingStateError:
return "error"
}
return ""
}