Documentation ¶
Index ¶
- Constants
- Variables
- func Contains(slice []string, target string) bool
- func FetchEnv(key string, def string) string
- func GetServicePortNumber(ctx context.Context, k8sClient client.Client, svcKey client.ObjectKey, ...) (int32, error)
- func IsObjectTaggedToDelete(obj client.Object) bool
- func IsOwnedBy(owned, owner client.Object) bool
- func MergeMapStringString(existing *map[string]string, desired map[string]string) bool
- func NamespacedNameToObjectKey(namespacedName, defaultNamespace string) client.ObjectKey
- func ObjectInfo(obj client.Object) string
- func StatusConditionsMarshalJSON(input []metav1.Condition) ([]byte, error)
- func TagObjectToDelete(obj client.Object)
- type RateLimitFactory
Constants ¶
View Source
const ( KuadrantNamespace = "kuadrant-system" KuadrantAuthorizationProvider = "kuadrant-authorization" LimitadorServiceGrpcPort = 8081 )
TODO: move the const to a proper place, or get it from config
View Source
const ( DeleteTagAnnotation = "kuadrant.io/delete" ReadyStatusConditionType = "Ready" )
Variables ¶
View Source
var (
LimitadorServiceClusterHost = fmt.Sprintf("limitador.%s.svc.cluster.local", KuadrantNamespace)
)
Functions ¶
func GetServicePortNumber ¶ added in v0.3.0
func GetServicePortNumber(ctx context.Context, k8sClient client.Client, svcKey client.ObjectKey, svcPort string) (int32, error)
GetServicePortNumber returns the port number from the referenced key and port info the port info can be named port or already a number.
func IsObjectTaggedToDelete ¶
func MergeMapStringString ¶ added in v0.3.0
MergeMapStringString Merge desired into existing. Not Thread-Safe. Does it matter?
func NamespacedNameToObjectKey ¶ added in v0.3.0
NamespacedNameToObjectKey converts <namespace/name> format string to k8s object key. It's common for K8s to reference an object using this format. For e.g. gateways in VirtualService.
func ObjectInfo ¶
func StatusConditionsMarshalJSON ¶
StatusConditionsMarshalJSON marshals the list of conditions as a JSON array, sorted by condition type.
func TagObjectToDelete ¶
Types ¶
type RateLimitFactory ¶ added in v0.3.0
type RateLimitFactory struct { Key client.ObjectKey Conditions []string MaxValue int Namespace string Seconds int Variables []string }
func (*RateLimitFactory) RateLimit ¶ added in v0.3.0
func (r *RateLimitFactory) RateLimit() *limitadorv1alpha1.RateLimit
Click to show internal directories.
Click to hide internal directories.