Documentation ¶
Index ¶
- func ClusterServiceBrokerName(clusterServiceBrokerName string) string
- func ClusterServiceClassName(serviceClass *v1beta1.ClusterServiceClass) string
- func ClusterServicePlanName(servicePlan *v1beta1.ClusterServicePlan) string
- func FromServiceInstanceOfClusterServiceClassAtBrokerName(instance *v1beta1.ServiceInstance, serviceClass *v1beta1.ClusterServiceClass, ...) string
- func FromServiceInstanceOfServiceClassAtBrokerName(instance *v1beta1.ServiceInstance, serviceClass *v1beta1.ServiceClass, ...) string
- func Name(kind Kind, k8sName, externalName string) string
- func ServiceBrokerName(serviceBrokerName string) string
- func ServiceClassName(serviceClass *v1beta1.ServiceClass) string
- func ServiceInstanceName(instance *v1beta1.ServiceInstance) string
- func ServicePlanName(servicePlan *v1beta1.ServicePlan) string
- type ContextBuilder
- func NewBindingContextBuilder(binding *v1beta1.ServiceBinding) *ContextBuilder
- func NewClusterServiceBrokerContextBuilder(broker *v1beta1.ClusterServiceBroker) *ContextBuilder
- func NewContextBuilder(kind Kind, namespace string, name string, resourceVersion string) *ContextBuilder
- func NewInstanceContextBuilder(instance *v1beta1.ServiceInstance) *ContextBuilder
- func NewServiceBrokerContextBuilder(broker *v1beta1.ServiceBroker) *ContextBuilder
- func (pcb *ContextBuilder) Message(msg string) string
- func (pcb *ContextBuilder) Messagef(format string, a ...interface{}) string
- func (pcb *ContextBuilder) SetKind(k Kind) *ContextBuilder
- func (pcb *ContextBuilder) SetName(n string) *ContextBuilder
- func (pcb *ContextBuilder) SetNamespace(n string) *ContextBuilder
- func (pcb ContextBuilder) String() string
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterServiceBrokerName ¶ added in v0.1.1
ClusterServiceBrokerName returns a string with the type and name of a broker
func ClusterServiceClassName ¶
func ClusterServiceClassName(serviceClass *v1beta1.ClusterServiceClass) string
ClusterServiceClassName returns a string with the k8s name and external name if available.
func ClusterServicePlanName ¶
func ClusterServicePlanName(servicePlan *v1beta1.ClusterServicePlan) string
ClusterServicePlanName returns a string with the k8s name and external name if available.
func FromServiceInstanceOfClusterServiceClassAtBrokerName ¶ added in v0.1.1
func FromServiceInstanceOfClusterServiceClassAtBrokerName(instance *v1beta1.ServiceInstance, serviceClass *v1beta1.ClusterServiceClass, brokerName string) string
FromServiceInstanceOfClusterServiceClassAtBrokerName returns a string in the form of "%s of %s at %s" to help in logging the full context.
func FromServiceInstanceOfServiceClassAtBrokerName ¶ added in v0.1.31
func FromServiceInstanceOfServiceClassAtBrokerName(instance *v1beta1.ServiceInstance, serviceClass *v1beta1.ServiceClass, brokerName string) string
FromServiceInstanceOfServiceClassAtBrokerName returns a string in the form of "%s of %s at %s" to help in logging the full context.
func Name ¶
Name prints in the form `<Kind> (K8S: <K8S-Name> ExternalName: <External-Name>)` kind is required. k8sName and externalName are optional
func ServiceBrokerName ¶ added in v0.1.31
ServiceBrokerName returns a string with the type and name of a broker
func ServiceClassName ¶ added in v0.1.31
func ServiceClassName(serviceClass *v1beta1.ServiceClass) string
ServiceClassName returns a string with the k8s name and external name if available.
func ServiceInstanceName ¶ added in v0.1.1
func ServiceInstanceName(instance *v1beta1.ServiceInstance) string
ServiceInstanceName returns a string with the type, namespace and name of an instance.
func ServicePlanName ¶ added in v0.1.31
func ServicePlanName(servicePlan *v1beta1.ServicePlan) string
ServicePlanName returns a string with the k8s name and external name if available.
Types ¶
type ContextBuilder ¶
ContextBuilder allows building up pretty message lines with context that is important for debugging and tracing. This class helps create log line formatting consistency. Pretty lines should be in the form: <Kind> "<Namespace>/<Name>" v<ResourceVersion>: <message>
func NewBindingContextBuilder ¶ added in v0.1.31
func NewBindingContextBuilder(binding *v1beta1.ServiceBinding) *ContextBuilder
NewBindingContextBuilder returns a new ContextBuilder that can be used to format messages in the form `ServiceBinding "<Namespace>/<Name>" v<ResourceVersion>: <message>`.
func NewClusterServiceBrokerContextBuilder ¶ added in v0.1.31
func NewClusterServiceBrokerContextBuilder(broker *v1beta1.ClusterServiceBroker) *ContextBuilder
NewClusterServiceBrokerContextBuilder returns a new ContextBuilder that can be used to format messages in the form `ClusterServiceBroker "<Name>" v<ResourceVersion>: <message>`.
func NewContextBuilder ¶
func NewContextBuilder(kind Kind, namespace string, name string, resourceVersion string) *ContextBuilder
NewContextBuilder returns a new ContextBuilder that can be used to format messages in the form `<Kind> "<Namespace>/<Name>" v<ResourceVersion>: <message>`. kind, namespace, name, resourceVersion are all optional.
func NewInstanceContextBuilder ¶ added in v0.1.31
func NewInstanceContextBuilder(instance *v1beta1.ServiceInstance) *ContextBuilder
NewInstanceContextBuilder returns a new ContextBuilder that can be used to format messages in the form `ServiceInstance "<Namespace>/<Name>" v<ResourceVersion>: <message>`.
func NewServiceBrokerContextBuilder ¶ added in v0.1.31
func NewServiceBrokerContextBuilder(broker *v1beta1.ServiceBroker) *ContextBuilder
NewServiceBrokerContextBuilder returns a new ContextBuilder that can be used to format messages in the form `ServiceBroker "<Namespace>/<Name>" v<ResourceVersion>: <message>`.
func (*ContextBuilder) Message ¶
func (pcb *ContextBuilder) Message(msg string) string
Message returns a string with message prepended with the current source context.
func (*ContextBuilder) Messagef ¶
func (pcb *ContextBuilder) Messagef(format string, a ...interface{}) string
Messagef returns a string with message formatted then prepended with the current source context.
func (*ContextBuilder) SetKind ¶
func (pcb *ContextBuilder) SetKind(k Kind) *ContextBuilder
SetKind sets the kind to use in the source context for messages.
func (*ContextBuilder) SetName ¶
func (pcb *ContextBuilder) SetName(n string) *ContextBuilder
SetName sets the name to use in the source context for messages.
func (*ContextBuilder) SetNamespace ¶
func (pcb *ContextBuilder) SetNamespace(n string) *ContextBuilder
SetNamespace sets the namespace to use in the source context for messages.
func (ContextBuilder) String ¶
func (pcb ContextBuilder) String() string
type Kind ¶
type Kind int
Kind is used for the enum of the Type of object we are building context for.