Documentation
¶
Index ¶
- func ClusterServiceClassName(serviceClass *v1beta1.ClusterServiceClass) string
- func ClusterServicePlanName(servicePlan *v1beta1.ClusterServicePlan) string
- func Name(kind Kind, k8sName, externalName string) 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 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.
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