Documentation ¶
Index ¶
- func ClusterServiceBrokerName(brokerName string) string
- func ClusterServiceClassName(serviceClass *v1beta1.ClusterServiceClass) string
- func ClusterServicePlanName(servicePlan *v1beta1.ClusterServicePlan) string
- func FromServiceInstanceOfClusterServiceClassAtBrokerName(instance *v1beta1.ServiceInstance, serviceClass *v1beta1.ClusterServiceClass, ...) string
- func Name(kind Kind, k8sName, externalName string) string
- func ServiceInstanceName(instance *v1beta1.ServiceInstance) string
- type 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 ¶
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 ¶
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 Name ¶
Name prints in the form `<Kind> (K8S: <K8S-Name> ExternalName: <External-Name>)` kind is required. k8sName and externalName are optional
func ServiceInstanceName ¶
func ServiceInstanceName(instance *v1beta1.ServiceInstance) string
ServiceInstanceName returns a string with the type, namespace and name of an instance.
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>": <message>
func NewContextBuilder ¶
func NewContextBuilder(kind Kind, namespace string, name string) *ContextBuilder
NewContextBuilder returns a new ContextBuilder that can be used to format messages in the form `<Kind> "<Namespace>/<Name>": <message>`. kind, namespace, name are all optional.
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