Documentation ¶
Index ¶
- func HasHTTPCode(err error, code int) bool
- func IsNotFound(err error) bool
- func LazyPtr[T comparable](v T) *T
- func ListFieldDiffs(l, r any) ([]string, error)
- func ListFieldDiffsForUnstructured(l, r *unstructured.Unstructured) ([]string, error)
- func LogBucketRef_ConvertToExternal(ctx context.Context, reader client.Reader, src client.Object, ...) error
- func MakeFQN(projectID, metricID string) string
- func NewLogMetricModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error)
- func ValueOf[T any](p *T) T
- type LogBucket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasHTTPCode ¶
HasHTTPCode returns true if the given error is an HTTP response with the given code.
func IsNotFound ¶
IsNotFound returns true if the given error is an HTTP 404.
func LazyPtr ¶ added in v1.118.1
func LazyPtr[T comparable](v T) *T
LazyPtr returns a pointer to v, unless it is the empty value, in which case it returns nil. It is essentially the inverse of ValueOf, though it is lossy because we can't tell nil and empty apart without a pointer.
func ListFieldDiffs ¶ added in v1.118.2
ListFieldDiffs returns a list of field paths where the values differ, for two arbitrary objects. If the objects are unstructured.Unstructured, use ListFieldDiffsForUnstructured for efficiency.
func ListFieldDiffsForUnstructured ¶ added in v1.118.2
func ListFieldDiffsForUnstructured(l, r *unstructured.Unstructured) ([]string, error)
ListFieldDiffsForUnstructured returns a list of field paths where the values differ, for two unstructured objects.
func LogBucketRef_ConvertToExternal ¶ added in v1.118.0
func MakeFQN ¶
MakeFQN constructions a fully qualified name for a LogMetric resources to be used in API calls. The format expected is: "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Func assumes values are well formed and validated.
func NewLogMetricModel ¶ added in v1.118.2
func NewLogMetricModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error)
Types ¶
type LogBucket ¶ added in v1.118.0
type LogBucket struct {
// contains filtered or unexported fields
}