package format
import "k8s.io/apiserver/pkg/util/flowcontrol/format"
Index ¶
- func BufferFlowSchemaSpec(buf *bytes.Buffer, fsSpec *flowcontrol.FlowSchemaSpec)
- func BufferFmtPolicyRulesWithSubjectsSlim(buf *bytes.Buffer, rule flowcontrol.PolicyRulesWithSubjects)
- func BufferPriorityLevelConfigurationSpec(buf *bytes.Buffer, plSpec *flowcontrol.PriorityLevelConfigurationSpec)
- func FmtFlowSchema(fs *flowcontrol.FlowSchema) string
- func FmtFlowSchemaSpec(fsSpec *flowcontrol.FlowSchemaSpec) string
- func FmtPolicyRulesWithSubjects(rule flowcontrol.PolicyRulesWithSubjects) string
- func FmtPolicyRulesWithSubjectsSlim(rule flowcontrol.PolicyRulesWithSubjects) string
- func FmtPriorityLevelConfiguration(pl *flowcontrol.PriorityLevelConfiguration) string
- func FmtPriorityLevelConfigurationSpec(plSpec *flowcontrol.PriorityLevelConfigurationSpec) string
- func FmtRequests(list []*request.RequestInfo) string
- func FmtUsers(list []user.Info) string
- func ToJSON(val interface{}) string
- type Stringer
Functions ¶
func BufferFlowSchemaSpec ¶
func BufferFlowSchemaSpec(buf *bytes.Buffer, fsSpec *flowcontrol.FlowSchemaSpec)
BufferFlowSchemaSpec writes a golang source expression for the given value to the given buffer
func BufferFmtPolicyRulesWithSubjectsSlim ¶
func BufferFmtPolicyRulesWithSubjectsSlim(buf *bytes.Buffer, rule flowcontrol.PolicyRulesWithSubjects)
BufferFmtPolicyRulesWithSubjectsSlim writes a golang source expression for the given value to the given buffer but excludes the leading type name
func BufferPriorityLevelConfigurationSpec ¶
func BufferPriorityLevelConfigurationSpec(buf *bytes.Buffer, plSpec *flowcontrol.PriorityLevelConfigurationSpec)
BufferPriorityLevelConfigurationSpec writes a golang source expression for the given value to the given buffer
func FmtFlowSchema ¶
func FmtFlowSchema(fs *flowcontrol.FlowSchema) string
FmtFlowSchema produces a golang source expression of the value.
func FmtFlowSchemaSpec ¶
func FmtFlowSchemaSpec(fsSpec *flowcontrol.FlowSchemaSpec) string
FmtFlowSchemaSpec produces a golang source expression equivalent to the given spec
func FmtPolicyRulesWithSubjects ¶
func FmtPolicyRulesWithSubjects(rule flowcontrol.PolicyRulesWithSubjects) string
FmtPolicyRulesWithSubjects produces a golang source expression of the value.
func FmtPolicyRulesWithSubjectsSlim ¶
func FmtPolicyRulesWithSubjectsSlim(rule flowcontrol.PolicyRulesWithSubjects) string
FmtPolicyRulesWithSubjectsSlim produces a golang source expression of the value but without the leading type name. See above for an example context where this is useful.
func FmtPriorityLevelConfiguration ¶
func FmtPriorityLevelConfiguration(pl *flowcontrol.PriorityLevelConfiguration) string
FmtPriorityLevelConfiguration returns a golang source expression equivalent to the given value
func FmtPriorityLevelConfigurationSpec ¶
func FmtPriorityLevelConfigurationSpec(plSpec *flowcontrol.PriorityLevelConfigurationSpec) string
FmtPriorityLevelConfigurationSpec returns a golang source expression equivalent to the given value
func FmtRequests ¶
func FmtRequests(list []*request.RequestInfo) string
FmtRequests produces a golang source expression of the value.
func FmtUsers ¶
FmtUsers produces a golang source expression of the value.
func ToJSON ¶
func ToJSON(val interface{}) string
ToJSON converts using encoding/json and handles errors by formatting them
Types ¶
type Stringer ¶
type Stringer struct {
// contains filtered or unexported fields
}
Stringer marks the given value for custom formatting by this package.
func Fmt ¶
func Fmt(val interface{}) Stringer
Fmt marks the given value for custom formatting by this package.
func (Stringer) String ¶
String formats to a string in full detail
Source Files ¶
formatting.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 hour ago –
Tools for package owners.