kubernetes: k8s.io/kubernetes/pkg/apis/discovery/fuzzer Index | Files

package fuzzer

import "k8s.io/kubernetes/pkg/apis/discovery/fuzzer"

Index

Package Files

fuzzer.go

Variables

var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
    return []interface{}{
        func(obj *discovery.EndpointSlice, c fuzz.Continue) {
            c.FuzzNoCustom(obj)

            if obj.AddressType == nil {
                ipAddressType := discovery.AddressTypeIP
                obj.AddressType = &ipAddressType
            }

            for i, endpointPort := range obj.Ports {
                if endpointPort.Name == nil {
                    emptyStr := ""
                    obj.Ports[i].Name = &emptyStr
                }

                if endpointPort.Protocol == nil {
                    protos := []api.Protocol{api.ProtocolTCP, api.ProtocolUDP, api.ProtocolSCTP}
                    obj.Ports[i].Protocol = &protos[c.Rand.Intn(len(protos))]
                }
            }
        },
    }
}

Funcs returns the fuzzer functions for the discovery api group.

Package fuzzer imports 4 packages (graph) and is imported by 10 packages. Updated 2019-08-29. Refresh now. Tools for package owners.