sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/internal/internal.go (about)

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    17  
    18  package internal
    19  
    20  import (
    21  	"fmt"
    22  	"sync"
    23  
    24  	typed "sigs.k8s.io/structured-merge-diff/v4/typed"
    25  )
    26  
    27  func Parser() *typed.Parser {
    28  	parserOnce.Do(func() {
    29  		var err error
    30  		parser, err = typed.NewParser(schemaYAML)
    31  		if err != nil {
    32  			panic(fmt.Sprintf("Failed to parse schema: %v", err))
    33  		}
    34  	})
    35  	return parser
    36  }
    37  
    38  var parserOnce sync.Once
    39  var parser *typed.Parser
    40  var schemaYAML = typed.YAMLObject(`types:
    41  - name: __untyped_atomic_
    42    scalar: untyped
    43    list:
    44      elementType:
    45        namedType: __untyped_atomic_
    46      elementRelationship: atomic
    47    map:
    48      elementType:
    49        namedType: __untyped_atomic_
    50      elementRelationship: atomic
    51  - name: __untyped_deduced_
    52    scalar: untyped
    53    list:
    54      elementType:
    55        namedType: __untyped_atomic_
    56      elementRelationship: atomic
    57    map:
    58      elementType:
    59        namedType: __untyped_deduced_
    60      elementRelationship: separable
    61  `)