diff --git a/go.mod b/go.mod index 3a2daa159..ba52123f4 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( k8s.io/api v0.30.3 k8s.io/apimachinery v0.30.3 k8s.io/client-go v0.30.3 - knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d + knative.dev/eventing v0.42.1-0.20240917082247-e79f3b65893a knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d - knative.dev/pkg v0.0.0-20240912132815-3002873b449c - knative.dev/serving v0.42.1-0.20240913121933-63b0f86a6e5f + knative.dev/pkg v0.0.0-20240917091217-aaab500c26c4 + knative.dev/serving v0.42.1-0.20240917162847-158a5c26b7fd ) require ( @@ -80,19 +80,19 @@ require ( go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.27.0 // indirect - golang.org/x/mod v0.20.0 // indirect + golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/tools v0.25.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.183.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect - google.golang.org/grpc v1.66.0 // indirect + google.golang.org/grpc v1.66.2 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -105,7 +105,7 @@ require ( k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect - knative.dev/networking v0.0.0-20240909015032-433920a35ef4 // indirect + knative.dev/networking v0.0.0-20240916143514-6c832c6e62a9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index 02a0845f7..e1fe2cf76 100644 --- a/go.sum +++ b/go.sum @@ -399,8 +399,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -575,8 +575,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -657,8 +657,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -728,16 +728,16 @@ k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 h1:1Wof1cGQgA5pqgo8MxKPtf k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d h1:/NvPwUqGfJ0VeLrPqjEb4zdEPz32qIooJnEqhaggF/U= -knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d/go.mod h1:gWM0Y5rhv2cLt/Se3q6z6zPNxsHb5oCS/5svsLeM06w= +knative.dev/eventing v0.42.1-0.20240917082247-e79f3b65893a h1:+sUGejZz6GcTxfN05zH/Yad84aOgfBcmuPM6QxHNwNc= +knative.dev/eventing v0.42.1-0.20240917082247-e79f3b65893a/go.mod h1:gWM0Y5rhv2cLt/Se3q6z6zPNxsHb5oCS/5svsLeM06w= knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d h1:mgROhGJG3+g0SBkaG4Y2HxrIOLN3ZZcN4+IFZla+Zqs= knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY= -knative.dev/networking v0.0.0-20240909015032-433920a35ef4 h1:ojjqMuTsY0DRQNdTAhkFl10cdchTzWkxwYjJS3oQ9dE= -knative.dev/networking v0.0.0-20240909015032-433920a35ef4/go.mod h1:i7nMwzWWbsorxAL9e88yTl/PugUDvtL6KtG5H/L0sg8= -knative.dev/pkg v0.0.0-20240912132815-3002873b449c h1:zKQ6HpKn6m20GgQ/NThGDFPwP9VSxv1j20aZDlRl3J8= -knative.dev/pkg v0.0.0-20240912132815-3002873b449c/go.mod h1:RHUKdAip7yEmlA6dc66hGANdLId04PMd2XJpFhP0EvI= -knative.dev/serving v0.42.1-0.20240913121933-63b0f86a6e5f h1:x7DPCHjTM0qRsmj/GnGxQDJfIVtmTWXCrR/WQuv5WW8= -knative.dev/serving v0.42.1-0.20240913121933-63b0f86a6e5f/go.mod h1:SaMptub7hykNnTquuVhU6Pkj8urFqJoV855o8mRN8BI= +knative.dev/networking v0.0.0-20240916143514-6c832c6e62a9 h1:NVjKxrfNd/4baWpxBPJIj6i4zTdxzH4x91OyAhRh/qw= +knative.dev/networking v0.0.0-20240916143514-6c832c6e62a9/go.mod h1:xEJLS8zsDQSRFN70ZO6jKHcmlzZ3+Rg9zueKiFg6V1E= +knative.dev/pkg v0.0.0-20240917091217-aaab500c26c4 h1:1yMPCa3CnWH8darWwC3YxBJC19ZvE/XNA4RtNnxKPDM= +knative.dev/pkg v0.0.0-20240917091217-aaab500c26c4/go.mod h1:ZK0e9aChRwXJCpT8cypwvn/bJYTo6ygmyjiaz0E32EY= +knative.dev/serving v0.42.1-0.20240917162847-158a5c26b7fd h1:bvIcn2nv3XJhC+7OkxtsWqK2ypoF4hRyWixRGluejY8= +knative.dev/serving v0.42.1-0.20240917162847-158a5c26b7fd/go.mod h1:rU9NqhtqGRmO3AStb0uaAYtndhNEbYDxyLn/AA3juDE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go index c2b4b711b..8f7afcb5d 100644 --- a/vendor/golang.org/x/tools/go/packages/external.go +++ b/vendor/golang.org/x/tools/go/packages/external.go @@ -82,7 +82,7 @@ type DriverResponse struct { type driver func(cfg *Config, patterns ...string) (*DriverResponse, error) // findExternalDriver returns the file path of a tool that supplies -// the build system package structure, or "" if not found." +// the build system package structure, or "" if not found. // If GOPACKAGESDRIVER is set in the environment findExternalTool returns its // value, otherwise it searches for a binary named gopackagesdriver on the PATH. func findExternalDriver(cfg *Config) driver { diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases.go b/vendor/golang.org/x/tools/internal/aliases/aliases.go index c24c2eee4..f7798e335 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases.go @@ -22,11 +22,17 @@ import ( // GODEBUG=gotypesalias=... by invoking the type checker. The Enabled // function is expensive and should be called once per task (e.g. // package import), not once per call to NewAlias. -func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type) *types.TypeName { +// +// Precondition: enabled || len(tparams)==0. +// If materialized aliases are disabled, there must not be any type parameters. +func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName { if enabled { tname := types.NewTypeName(pos, pkg, name, nil) - newAlias(tname, rhs) + newAlias(tname, rhs, tparams) return tname } + if len(tparams) > 0 { + panic("cannot create an alias with type parameters when gotypesalias is not enabled") + } return types.NewTypeName(pos, pkg, name, rhs) } diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go index 6652f7db0..a775fcc4b 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go @@ -27,7 +27,9 @@ func Origin(alias *Alias) *Alias { panic("unreachabl // Unalias returns the type t for go <=1.21. func Unalias(t types.Type) types.Type { return t } -func newAlias(name *types.TypeName, rhs types.Type) *Alias { panic("unreachable") } +func newAlias(name *types.TypeName, rhs types.Type, tparams []*types.TypeParam) *Alias { + panic("unreachable") +} // Enabled reports whether [NewAlias] should create [types.Alias] types. // diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go index 3ef1afeb4..31c159e42 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go @@ -70,10 +70,9 @@ func Unalias(t types.Type) types.Type { return types.Unalias(t) } // newAlias is an internal alias around types.NewAlias. // Direct usage is discouraged as the moment. // Try to use NewAlias instead. -func newAlias(tname *types.TypeName, rhs types.Type) *Alias { +func newAlias(tname *types.TypeName, rhs types.Type, tparams []*types.TypeParam) *Alias { a := types.NewAlias(tname, rhs) - // TODO(go.dev/issue/65455): Remove kludgy workaround to set a.actual as a side-effect. - Unalias(a) + SetTypeParams(a, tparams) return a } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index deeb67f31..5f283281a 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -2,9 +2,227 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Indexed binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; -// see that file for specification of the format. +// Indexed package export. +// +// The indexed export data format is an evolution of the previous +// binary export data format. Its chief contribution is introducing an +// index table, which allows efficient random access of individual +// declarations and inline function bodies. In turn, this allows +// avoiding unnecessary work for compilation units that import large +// packages. +// +// +// The top-level data format is structured as: +// +// Header struct { +// Tag byte // 'i' +// Version uvarint +// StringSize uvarint +// DataSize uvarint +// } +// +// Strings [StringSize]byte +// Data [DataSize]byte +// +// MainIndex []struct{ +// PkgPath stringOff +// PkgName stringOff +// PkgHeight uvarint +// +// Decls []struct{ +// Name stringOff +// Offset declOff +// } +// } +// +// Fingerprint [8]byte +// +// uvarint means a uint64 written out using uvarint encoding. +// +// []T means a uvarint followed by that many T objects. In other +// words: +// +// Len uvarint +// Elems [Len]T +// +// stringOff means a uvarint that indicates an offset within the +// Strings section. At that offset is another uvarint, followed by +// that many bytes, which form the string value. +// +// declOff means a uvarint that indicates an offset within the Data +// section where the associated declaration can be found. +// +// +// There are five kinds of declarations, distinguished by their first +// byte: +// +// type Var struct { +// Tag byte // 'V' +// Pos Pos +// Type typeOff +// } +// +// type Func struct { +// Tag byte // 'F' or 'G' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'G' +// Signature Signature +// } +// +// type Const struct { +// Tag byte // 'C' +// Pos Pos +// Value Value +// } +// +// type Type struct { +// Tag byte // 'T' or 'U' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'U' +// Underlying typeOff +// +// Methods []struct{ // omitted if Underlying is an interface type +// Pos Pos +// Name stringOff +// Recv Param +// Signature Signature +// } +// } +// +// type Alias struct { +// Tag byte // 'A' or 'B' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'B' +// Type typeOff +// } +// +// // "Automatic" declaration of each typeparam +// type TypeParam struct { +// Tag byte // 'P' +// Pos Pos +// Implicit bool +// Constraint typeOff +// } +// +// typeOff means a uvarint that either indicates a predeclared type, +// or an offset into the Data section. If the uvarint is less than +// predeclReserved, then it indicates the index into the predeclared +// types list (see predeclared in bexport.go for order). Otherwise, +// subtracting predeclReserved yields the offset of a type descriptor. +// +// Value means a type, kind, and type-specific value. See +// (*exportWriter).value for details. +// +// +// There are twelve kinds of type descriptors, distinguished by an itag: +// +// type DefinedType struct { +// Tag itag // definedType +// Name stringOff +// PkgPath stringOff +// } +// +// type PointerType struct { +// Tag itag // pointerType +// Elem typeOff +// } +// +// type SliceType struct { +// Tag itag // sliceType +// Elem typeOff +// } +// +// type ArrayType struct { +// Tag itag // arrayType +// Len uint64 +// Elem typeOff +// } +// +// type ChanType struct { +// Tag itag // chanType +// Dir uint64 // 1 RecvOnly; 2 SendOnly; 3 SendRecv +// Elem typeOff +// } +// +// type MapType struct { +// Tag itag // mapType +// Key typeOff +// Elem typeOff +// } +// +// type FuncType struct { +// Tag itag // signatureType +// PkgPath stringOff +// Signature Signature +// } +// +// type StructType struct { +// Tag itag // structType +// PkgPath stringOff +// Fields []struct { +// Pos Pos +// Name stringOff +// Type typeOff +// Embedded bool +// Note stringOff +// } +// } +// +// type InterfaceType struct { +// Tag itag // interfaceType +// PkgPath stringOff +// Embeddeds []struct { +// Pos Pos +// Type typeOff +// } +// Methods []struct { +// Pos Pos +// Name stringOff +// Signature Signature +// } +// } +// +// // Reference to a type param declaration +// type TypeParamType struct { +// Tag itag // typeParamType +// Name stringOff +// PkgPath stringOff +// } +// +// // Instantiation of a generic type (like List[T2] or List[int]) +// type InstanceType struct { +// Tag itag // instanceType +// Pos pos +// TypeArgs []typeOff +// BaseType typeOff +// } +// +// type UnionType struct { +// Tag itag // interfaceType +// Terms []struct { +// tilde bool +// Type typeOff +// } +// } +// +// +// +// type Signature struct { +// Params []Param +// Results []Param +// Variadic bool // omitted if Results is empty +// } +// +// type Param struct { +// Pos Pos +// Name stringOff +// Type typOff +// } +// +// +// Pos encodes a file:line:column triple, incorporating a simple delta +// encoding scheme within a data object. See exportWriter.pos for +// details. package gcimporter @@ -523,9 +741,22 @@ func (p *iexporter) doDecl(obj types.Object) { } if obj.IsAlias() { - w.tag(aliasTag) + alias, materialized := t.(*aliases.Alias) // may fail when aliases are not enabled + + var tparams *types.TypeParamList + if materialized { + tparams = aliases.TypeParams(alias) + } + if tparams.Len() == 0 { + w.tag(aliasTag) + } else { + w.tag(genericAliasTag) + } w.pos(obj.Pos()) - if alias, ok := t.(*aliases.Alias); ok { + if tparams.Len() > 0 { + w.tparamList(obj.Name(), tparams, obj.Pkg()) + } + if materialized { // Preserve materialized aliases, // even of non-exported types. t = aliases.Rhs(alias) @@ -745,7 +976,13 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { } switch t := t.(type) { case *aliases.Alias: - // TODO(adonovan): support parameterized aliases, following *types.Named. + if targs := aliases.TypeArgs(t); targs.Len() > 0 { + w.startType(instanceType) + w.pos(t.Obj().Pos()) + w.typeList(targs, pkg) + w.typ(aliases.Origin(t), pkg) + return + } w.startType(aliasType) w.qualifiedType(t.Obj()) diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 136aa0365..ed2d56295 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Indexed package import. -// See cmd/compile/internal/gc/iexport.go for the export data format. +// See iexport.go for the export data format. // This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. @@ -562,14 +562,14 @@ func (r *importReader) obj(name string) { pos := r.pos() switch tag { - case aliasTag: + case aliasTag, genericAliasTag: + var tparams []*types.TypeParam + if tag == genericAliasTag { + tparams = r.tparamList() + } typ := r.typ() - // TODO(adonovan): support generic aliases: - // if tag == genericAliasTag { - // tparams := r.tparamList() - // alias.SetTypeParams(tparams) - // } - r.declare(aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ)) + obj := aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ, tparams) + r.declare(obj) case constTag: typ, val := r.value() @@ -862,7 +862,7 @@ func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } func (r *importReader) doType(base *types.Named) (res types.Type) { k := r.kind() if debug { - r.p.trace("importing type %d (base: %s)", k, base) + r.p.trace("importing type %d (base: %v)", k, base) r.p.indent++ defer func() { r.p.indent-- diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go index 2c0770688..f0742f540 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go @@ -52,8 +52,7 @@ func (pr *pkgReader) later(fn func()) { // See cmd/compile/internal/noder.derivedInfo. type derivedInfo struct { - idx pkgbits.Index - needed bool + idx pkgbits.Index } // See cmd/compile/internal/noder.typeInfo. @@ -110,13 +109,17 @@ func readUnifiedPackage(fset *token.FileSet, ctxt *types.Context, imports map[st r := pr.newReader(pkgbits.RelocMeta, pkgbits.PublicRootIdx, pkgbits.SyncPublic) pkg := r.pkg() - r.Bool() // has init + if r.Version().Has(pkgbits.HasInit) { + r.Bool() + } for i, n := 0, r.Len(); i < n; i++ { // As if r.obj(), but avoiding the Scope.Lookup call, // to avoid eager loading of imports. r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } r.p.objIdx(r.Reloc(pkgbits.RelocObj)) assert(r.Len() == 0) } @@ -165,7 +168,7 @@ type readerDict struct { // tparams is a slice of the constructed TypeParams for the element. tparams []*types.TypeParam - // devived is a slice of types derived from tparams, which may be + // derived is a slice of types derived from tparams, which may be // instantiated while reading the current element. derived []derivedInfo derivedTypes []types.Type // lazily instantiated from derived @@ -471,7 +474,9 @@ func (r *reader) param() *types.Var { func (r *reader) obj() (types.Object, []types.Type) { r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } pkg, name := r.p.objIdx(r.Reloc(pkgbits.RelocObj)) obj := pkgScope(pkg).Lookup(name) @@ -525,8 +530,12 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { case pkgbits.ObjAlias: pos := r.pos() + var tparams []*types.TypeParam + if r.Version().Has(pkgbits.AliasTypeParamNames) { + tparams = r.typeParamNames() + } typ := r.typ() - declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ)) + declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ, tparams)) case pkgbits.ObjConst: pos := r.pos() @@ -632,7 +641,10 @@ func (pr *pkgReader) objDictIdx(idx pkgbits.Index) *readerDict { dict.derived = make([]derivedInfo, r.Len()) dict.derivedTypes = make([]types.Type, len(dict.derived)) for i := range dict.derived { - dict.derived[i] = derivedInfo{r.Reloc(pkgbits.RelocType), r.Bool()} + dict.derived[i] = derivedInfo{idx: r.Reloc(pkgbits.RelocType)} + if r.Version().Has(pkgbits.DerivedInfoNeeded) { + assert(!r.Bool()) + } } pr.retireReader(r) diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 91221fda3..8555e3f83 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -245,7 +245,10 @@ func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleRe // 2. Use this to separate module cache scanning from other scanning. func gomodcacheForEnv(goenv map[string]string) string { if gmc := goenv["GOMODCACHE"]; gmc != "" { - return gmc + // golang/go#67156: ensure that the module cache is clean, since it is + // assumed as a prefix to directories scanned by gopathwalk, which are + // themselves clean. + return filepath.Clean(gmc) } gopaths := filepath.SplitList(goenv["GOPATH"]) if len(gopaths) == 0 { @@ -740,8 +743,8 @@ func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) directoryPackageInfo { subdir := "" - if dir != root.Path { - subdir = dir[len(root.Path)+len("/"):] + if prefix := root.Path + string(filepath.Separator); strings.HasPrefix(dir, prefix) { + subdir = dir[len(prefix):] } importPath := filepath.ToSlash(subdir) if strings.HasPrefix(importPath, "vendor/") { diff --git a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go index b92e8e6eb..f6cb37c5c 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go @@ -21,7 +21,7 @@ import ( // export data. type PkgDecoder struct { // version is the file format version. - version uint32 + version Version // sync indicates whether the file uses sync markers. sync bool @@ -68,8 +68,6 @@ func (pr *PkgDecoder) SyncMarkers() bool { return pr.sync } // NewPkgDecoder returns a PkgDecoder initialized to read the Unified // IR export data from input. pkgPath is the package path for the // compilation unit that produced the export data. -// -// TODO(mdempsky): Remove pkgPath parameter; unneeded since CL 391014. func NewPkgDecoder(pkgPath, input string) PkgDecoder { pr := PkgDecoder{ pkgPath: pkgPath, @@ -80,14 +78,15 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { r := strings.NewReader(input) - assert(binary.Read(r, binary.LittleEndian, &pr.version) == nil) + var ver uint32 + assert(binary.Read(r, binary.LittleEndian, &ver) == nil) + pr.version = Version(ver) - switch pr.version { - default: - panic(fmt.Errorf("unsupported version: %v", pr.version)) - case 0: - // no flags - case 1: + if pr.version >= numVersions { + panic(fmt.Errorf("cannot decode %q, export data version %d is greater than maximum supported version %d", pkgPath, pr.version, numVersions-1)) + } + + if pr.version.Has(Flags) { var flags uint32 assert(binary.Read(r, binary.LittleEndian, &flags) == nil) pr.sync = flags&flagSyncMarkers != 0 @@ -102,7 +101,9 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { assert(err == nil) pr.elemData = input[pos:] - assert(len(pr.elemData)-8 == int(pr.elemEnds[len(pr.elemEnds)-1])) + + const fingerprintSize = 8 + assert(len(pr.elemData)-fingerprintSize == int(pr.elemEnds[len(pr.elemEnds)-1])) return pr } @@ -136,7 +137,7 @@ func (pr *PkgDecoder) AbsIdx(k RelocKind, idx Index) int { absIdx += int(pr.elemEndsEnds[k-1]) } if absIdx >= int(pr.elemEndsEnds[k]) { - errorf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) + panicf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) } return absIdx } @@ -193,9 +194,7 @@ func (pr *PkgDecoder) NewDecoderRaw(k RelocKind, idx Index) Decoder { Idx: idx, } - // TODO(mdempsky) r.data.Reset(...) after #44505 is resolved. - r.Data = *strings.NewReader(pr.DataIdx(k, idx)) - + r.Data.Reset(pr.DataIdx(k, idx)) r.Sync(SyncRelocs) r.Relocs = make([]RelocEnt, r.Len()) for i := range r.Relocs { @@ -244,7 +243,7 @@ type Decoder struct { func (r *Decoder) checkErr(err error) { if err != nil { - errorf("unexpected decoding error: %w", err) + panicf("unexpected decoding error: %w", err) } } @@ -515,3 +514,6 @@ func (pr *PkgDecoder) PeekObj(idx Index) (string, string, CodeObj) { return path, name, tag } + +// Version reports the version of the bitstream. +func (w *Decoder) Version() Version { return w.common.version } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go index 6482617a4..c17a12399 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go @@ -12,18 +12,15 @@ import ( "io" "math/big" "runtime" + "strings" ) -// currentVersion is the current version number. -// -// - v0: initial prototype -// -// - v1: adds the flags uint32 word -const currentVersion uint32 = 1 - // A PkgEncoder provides methods for encoding a package's Unified IR // export data. type PkgEncoder struct { + // version of the bitstream. + version Version + // elems holds the bitstream for previously encoded elements. elems [numRelocs][]string @@ -47,8 +44,9 @@ func (pw *PkgEncoder) SyncMarkers() bool { return pw.syncFrames >= 0 } // export data files, but can help diagnosing desync errors in // higher-level Unified IR reader/writer code. If syncFrames is // negative, then sync markers are omitted entirely. -func NewPkgEncoder(syncFrames int) PkgEncoder { +func NewPkgEncoder(version Version, syncFrames int) PkgEncoder { return PkgEncoder{ + version: version, stringsIdx: make(map[string]Index), syncFrames: syncFrames, } @@ -64,13 +62,15 @@ func (pw *PkgEncoder) DumpTo(out0 io.Writer) (fingerprint [8]byte) { assert(binary.Write(out, binary.LittleEndian, x) == nil) } - writeUint32(currentVersion) + writeUint32(uint32(pw.version)) - var flags uint32 - if pw.SyncMarkers() { - flags |= flagSyncMarkers + if pw.version.Has(Flags) { + var flags uint32 + if pw.SyncMarkers() { + flags |= flagSyncMarkers + } + writeUint32(flags) } - writeUint32(flags) // Write elemEndsEnds. var sum uint32 @@ -159,7 +159,7 @@ type Encoder struct { // Flush finalizes the element's bitstream and returns its Index. func (w *Encoder) Flush() Index { - var sb bytes.Buffer // TODO(mdempsky): strings.Builder after #44505 is resolved + var sb strings.Builder // Backup the data so we write the relocations at the front. var tmp bytes.Buffer @@ -189,7 +189,7 @@ func (w *Encoder) Flush() Index { func (w *Encoder) checkErr(err error) { if err != nil { - errorf("unexpected encoding error: %v", err) + panicf("unexpected encoding error: %v", err) } } @@ -320,8 +320,14 @@ func (w *Encoder) Code(c Code) { // section (if not already present), and then writing a relocation // into the element bitstream. func (w *Encoder) String(s string) { + w.StringRef(w.p.StringIdx(s)) +} + +// StringRef writes a reference to the given index, which must be a +// previously encoded string value. +func (w *Encoder) StringRef(idx Index) { w.Sync(SyncString) - w.Reloc(RelocString, w.p.StringIdx(s)) + w.Reloc(RelocString, idx) } // Strings encodes and writes a variable-length slice of strings into @@ -348,7 +354,7 @@ func (w *Encoder) Value(val constant.Value) { func (w *Encoder) scalar(val constant.Value) { switch v := constant.Val(val).(type) { default: - errorf("unhandled %v (%v)", val, val.Kind()) + panicf("unhandled %v (%v)", val, val.Kind()) case bool: w.Code(ValBool) w.Bool(v) @@ -381,3 +387,6 @@ func (w *Encoder) bigFloat(v *big.Float) { b := v.Append(nil, 'p', -1) w.String(string(b)) // TODO: More efficient encoding. } + +// Version reports the version of the bitstream. +func (w *Encoder) Version() Version { return w.p.version } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go deleted file mode 100644 index 5294f6a63..000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.7 -// +build !go1.7 - -// TODO(mdempsky): Remove after #44505 is resolved - -package pkgbits - -import "runtime" - -func walkFrames(pcs []uintptr, visit frameVisitor) { - for _, pc := range pcs { - fn := runtime.FuncForPC(pc) - file, line := fn.FileLine(pc) - - visit(file, line, fn.Name(), pc-fn.Entry()) - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go deleted file mode 100644 index 2324ae7ad..000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.7 -// +build go1.7 - -package pkgbits - -import "runtime" - -// walkFrames calls visit for each call frame represented by pcs. -// -// pcs should be a slice of PCs, as returned by runtime.Callers. -func walkFrames(pcs []uintptr, visit frameVisitor) { - if len(pcs) == 0 { - return - } - - frames := runtime.CallersFrames(pcs) - for { - frame, more := frames.Next() - visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) - if !more { - return - } - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/support.go b/vendor/golang.org/x/tools/internal/pkgbits/support.go index ad26d3b28..50534a295 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/support.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/support.go @@ -12,6 +12,6 @@ func assert(b bool) { } } -func errorf(format string, args ...interface{}) { +func panicf(format string, args ...any) { panic(fmt.Errorf(format, args...)) } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/sync.go b/vendor/golang.org/x/tools/internal/pkgbits/sync.go index 5bd51ef71..1520b73af 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/sync.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/sync.go @@ -6,6 +6,7 @@ package pkgbits import ( "fmt" + "runtime" "strings" ) @@ -23,6 +24,24 @@ func fmtFrames(pcs ...uintptr) []string { type frameVisitor func(file string, line int, name string, offset uintptr) +// walkFrames calls visit for each call frame represented by pcs. +// +// pcs should be a slice of PCs, as returned by runtime.Callers. +func walkFrames(pcs []uintptr, visit frameVisitor) { + if len(pcs) == 0 { + return + } + + frames := runtime.CallersFrames(pcs) + for { + frame, more := frames.Next() + visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) + if !more { + return + } + } +} + // SyncMarker is an enum type that represents markers that may be // written to export data to ensure the reader and writer stay // synchronized. @@ -110,4 +129,8 @@ const ( SyncStmtsEnd SyncLabel SyncOptLabel + + SyncMultiExpr + SyncRType + SyncConvRTTI ) diff --git a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go index 4a5b0ca5f..582ad56d3 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go @@ -74,11 +74,14 @@ func _() { _ = x[SyncStmtsEnd-64] _ = x[SyncLabel-65] _ = x[SyncOptLabel-66] + _ = x[SyncMultiExpr-67] + _ = x[SyncRType-68] + _ = x[SyncConvRTTI-69] } -const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabel" +const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabelMultiExprRTypeConvRTTI" -var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458} +var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458, 467, 472, 480} func (i SyncMarker) String() string { i -= 1 diff --git a/vendor/golang.org/x/tools/internal/pkgbits/version.go b/vendor/golang.org/x/tools/internal/pkgbits/version.go new file mode 100644 index 000000000..53af9df22 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/pkgbits/version.go @@ -0,0 +1,85 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkgbits + +// Version indicates a version of a unified IR bitstream. +// Each Version indicates the addition, removal, or change of +// new data in the bitstream. +// +// These are serialized to disk and the interpretation remains fixed. +type Version uint32 + +const ( + // V0: initial prototype. + // + // All data that is not assigned a Field is in version V0 + // and has not been deprecated. + V0 Version = iota + + // V1: adds the Flags uint32 word + V1 + + // V2: removes unused legacy fields and supports type parameters for aliases. + // - remove the legacy "has init" bool from the public root + // - remove obj's "derived func instance" bool + // - add a TypeParamNames field to ObjAlias + // - remove derived info "needed" bool + V2 + + numVersions = iota +) + +// Field denotes a unit of data in the serialized unified IR bitstream. +// It is conceptually a like field in a structure. +// +// We only really need Fields when the data may or may not be present +// in a stream based on the Version of the bitstream. +// +// Unlike much of pkgbits, Fields are not serialized and +// can change values as needed. +type Field int + +const ( + // Flags in a uint32 in the header of a bitstream + // that is used to indicate whether optional features are enabled. + Flags Field = iota + + // Deprecated: HasInit was a bool indicating whether a package + // has any init functions. + HasInit + + // Deprecated: DerivedFuncInstance was a bool indicating + // whether an object was a function instance. + DerivedFuncInstance + + // ObjAlias has a list of TypeParamNames. + AliasTypeParamNames + + // Deprecated: DerivedInfoNeeded was a bool indicating + // whether a type was a derived type. + DerivedInfoNeeded + + numFields = iota +) + +// introduced is the version a field was added. +var introduced = [numFields]Version{ + Flags: V1, + AliasTypeParamNames: V2, +} + +// removed is the version a field was removed in or 0 for fields +// that have not yet been deprecated. +// (So removed[f]-1 is the last version it is included in.) +var removed = [numFields]Version{ + HasInit: V2, + DerivedFuncInstance: V2, + DerivedInfoNeeded: V2, +} + +// Has reports whether field f is present in a bitstream at version v. +func (v Version) Has(f Field) bool { + return introduced[f] <= v && (v < removed[f] || removed[f] == V0) +} diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index a928acf29..cdaac9ab3 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -951,7 +951,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParseSessionState", Func, 21}, {"QUICClient", Func, 21}, {"QUICConfig", Type, 21}, - {"QUICConfig.EnableStoreSessionEvent", Field, 23}, + {"QUICConfig.EnableSessionEvents", Field, 23}, {"QUICConfig.TLSConfig", Field, 21}, {"QUICConn", Type, 21}, {"QUICEncryptionLevel", Type, 21}, diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go index 834e05381..131caab28 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go @@ -838,7 +838,7 @@ const ( // InvalidCap occurs when an argument to the cap built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -859,7 +859,7 @@ const ( // InvalidCopy occurs when the arguments are not of slice type or do not // have compatible type. // - // See https://golang.org/ref/spec#Appendingand_copying_slices for more + // See https://golang.org/ref/spec#Appending_and_copying_slices for more // information on the type requirements for the copy built-in. // // Example: @@ -897,7 +897,7 @@ const ( // InvalidLen occurs when an argument to the len built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -914,7 +914,7 @@ const ( // InvalidMake occurs when make is called with an unsupported type argument. // - // See https://golang.org/ref/spec#Makingslices_maps_and_channels for + // See https://golang.org/ref/spec#Making_slices_maps_and_channels for // information on the types that may be created using make. // // Example: diff --git a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go index 930140f57..1d827dd5d 100644 --- a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go +++ b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go @@ -20,7 +20,6 @@ package stats import ( "maps" - "testing" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/internal" @@ -250,9 +249,9 @@ func RegisterInt64Gauge(descriptor MetricDescriptor) *Int64GaugeHandle { } // snapshotMetricsRegistryForTesting snapshots the global data of the metrics -// registry. Registers a cleanup function on the provided testing.T that sets -// the metrics registry to its original state. Only called in testing functions. -func snapshotMetricsRegistryForTesting(t *testing.T) { +// registry. Returns a cleanup function that sets the metrics registry to its +// original state. +func snapshotMetricsRegistryForTesting() func() { oldDefaultMetrics := DefaultMetrics oldRegisteredMetrics := registeredMetrics oldMetricsRegistry := metricsRegistry @@ -262,9 +261,9 @@ func snapshotMetricsRegistryForTesting(t *testing.T) { maps.Copy(registeredMetrics, registeredMetrics) maps.Copy(metricsRegistry, metricsRegistry) - t.Cleanup(func() { + return func() { DefaultMetrics = oldDefaultMetrics registeredMetrics = oldRegisteredMetrics metricsRegistry = oldMetricsRegistry - }) + } } diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index 65f936a62..73fa407b6 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -217,10 +217,9 @@ var ( SetConnectedAddress any // func(scs *SubConnState, addr resolver.Address) // SnapshotMetricRegistryForTesting snapshots the global data of the metric - // registry. Registers a cleanup function on the provided testing.T that - // sets the metric registry to its original state. Only called in testing - // functions. - SnapshotMetricRegistryForTesting any // func(t *testing.T) + // registry. Returns a cleanup function that sets the metric registry to its + // original state. Only called in testing functions. + SnapshotMetricRegistryForTesting func() func() // SetDefaultBufferPoolForTesting updates the default buffer pool, for // testing purposes. diff --git a/vendor/google.golang.org/grpc/mem/buffer_slice.go b/vendor/google.golang.org/grpc/mem/buffer_slice.go index d7775cea6..228e9c2f2 100644 --- a/vendor/google.golang.org/grpc/mem/buffer_slice.go +++ b/vendor/google.golang.org/grpc/mem/buffer_slice.go @@ -19,7 +19,6 @@ package mem import ( - "compress/flate" "io" ) @@ -92,9 +91,11 @@ func (s BufferSlice) Materialize() []byte { } // MaterializeToBuffer functions like Materialize except that it writes the data -// to a single Buffer pulled from the given BufferPool. As a special case, if the -// input BufferSlice only actually has one Buffer, this function has nothing to -// do and simply returns said Buffer. +// to a single Buffer pulled from the given BufferPool. +// +// As a special case, if the input BufferSlice only actually has one Buffer, this +// function simply increases the refcount before returning said Buffer. Freeing this +// buffer won't release it until the BufferSlice is itself released. func (s BufferSlice) MaterializeToBuffer(pool BufferPool) Buffer { if len(s) == 1 { s[0].Ref() @@ -124,7 +125,8 @@ func (s BufferSlice) Reader() Reader { // Remaining(), which returns the number of unread bytes remaining in the slice. // Buffers will be freed as they are read. type Reader interface { - flate.Reader + io.Reader + io.ByteReader // Close frees the underlying BufferSlice and never returns an error. Subsequent // calls to Read will return (0, io.EOF). Close() error diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 457d27338..d1e1415a4 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1359,6 +1359,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor } return err } + defer d.Free() if channelz.IsOn() { t.IncrMsgRecv() } diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 1ffec6e2c..7c70005d0 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.66.0" +const Version = "1.66.2" diff --git a/vendor/knative.dev/eventing/pkg/auth/token_verifier.go b/vendor/knative.dev/eventing/pkg/auth/verifier.go similarity index 84% rename from vendor/knative.dev/eventing/pkg/auth/token_verifier.go rename to vendor/knative.dev/eventing/pkg/auth/verifier.go index 0d2c3888b..3cf9c436b 100644 --- a/vendor/knative.dev/eventing/pkg/auth/token_verifier.go +++ b/vendor/knative.dev/eventing/pkg/auth/verifier.go @@ -27,7 +27,6 @@ import ( "time" duckv1 "knative.dev/eventing/pkg/apis/duck/v1" - eventpolicyinformer "knative.dev/eventing/pkg/client/injection/informers/eventing/v1alpha1/eventpolicy" "knative.dev/eventing/pkg/client/listers/eventing/v1alpha1" "github.com/cloudevents/sdk-go/v2/binding" @@ -37,6 +36,7 @@ import ( "k8s.io/client-go/rest" eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" "knative.dev/eventing/pkg/apis/feature" + listerseventingv1alpha1 "knative.dev/eventing/pkg/client/listers/eventing/v1alpha1" "knative.dev/pkg/injection" "knative.dev/pkg/logging" ) @@ -45,7 +45,7 @@ const ( kubernetesOIDCDiscoveryBaseURL = "https://kubernetes.default.svc" ) -type OIDCTokenVerifier struct { +type Verifier struct { logger *zap.SugaredLogger restConfig *rest.Config provider *oidc.Provider @@ -61,11 +61,11 @@ type IDToken struct { AccessTokenHash string } -func NewOIDCTokenVerifier(ctx context.Context) *OIDCTokenVerifier { - tokenHandler := &OIDCTokenVerifier{ +func NewVerifier(ctx context.Context, eventPolicyLister listerseventingv1alpha1.EventPolicyLister) *Verifier { + tokenHandler := &Verifier{ logger: logging.FromContext(ctx).With("component", "oidc-token-handler"), restConfig: injection.GetConfig(ctx), - eventPolicyLister: eventpolicyinformer.Get(ctx).Lister(), + eventPolicyLister: eventPolicyLister, } if err := tokenHandler.initOIDCProvider(ctx); err != nil { @@ -75,18 +75,9 @@ func NewOIDCTokenVerifier(ctx context.Context) *OIDCTokenVerifier { return tokenHandler } -// VerifyJWTFromRequest verifies if the incoming request contains a correct JWT token -// -// Deprecated: use OIDCTokenVerifier.Verify() instead to bundle AuthN and AuthZ verification -func (v *OIDCTokenVerifier) VerifyJWTFromRequest(ctx context.Context, r *http.Request, audience *string, response http.ResponseWriter) error { - _, err := v.verifyAuthN(ctx, audience, r, response) - - return err -} - // VerifyRequest verifies AuthN and AuthZ in the request. On verification errors, it sets the // responses HTTP status and returns an error -func (v *OIDCTokenVerifier) VerifyRequest(ctx context.Context, features feature.Flags, requiredOIDCAudience *string, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error { +func (v *Verifier) VerifyRequest(ctx context.Context, features feature.Flags, requiredOIDCAudience *string, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error { if !features.IsOIDCAuthentication() { return nil } @@ -109,7 +100,7 @@ func (v *OIDCTokenVerifier) VerifyRequest(ctx context.Context, features feature. // On verification errors, it sets the responses HTTP status and returns an error. // This method is similar to VerifyRequest() except that VerifyRequestFromSubject() // verifies in the AuthZ part that the request comes from a given subject. -func (v *OIDCTokenVerifier) VerifyRequestFromSubject(ctx context.Context, features feature.Flags, requiredOIDCAudience *string, allowedSubject string, req *http.Request, resp http.ResponseWriter) error { +func (v *Verifier) VerifyRequestFromSubject(ctx context.Context, features feature.Flags, requiredOIDCAudience *string, allowedSubject string, req *http.Request, resp http.ResponseWriter) error { if !features.IsOIDCAuthentication() { return nil } @@ -128,7 +119,7 @@ func (v *OIDCTokenVerifier) VerifyRequestFromSubject(ctx context.Context, featur } // verifyAuthN verifies if the incoming request contains a correct JWT token -func (v *OIDCTokenVerifier) verifyAuthN(ctx context.Context, audience *string, req *http.Request, resp http.ResponseWriter) (*IDToken, error) { +func (v *Verifier) verifyAuthN(ctx context.Context, audience *string, req *http.Request, resp http.ResponseWriter) (*IDToken, error) { token := GetJWTFromHeader(req.Header) if token == "" { resp.WriteHeader(http.StatusUnauthorized) @@ -150,7 +141,7 @@ func (v *OIDCTokenVerifier) verifyAuthN(ctx context.Context, audience *string, r } // verifyAuthZ verifies if the given idToken is allowed by the resources eventPolicyStatus -func (v *OIDCTokenVerifier) verifyAuthZ(ctx context.Context, features feature.Flags, idToken *IDToken, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error { +func (v *Verifier) verifyAuthZ(ctx context.Context, features feature.Flags, idToken *IDToken, resourceNamespace string, policyRefs []duckv1.AppliedEventPolicyRef, req *http.Request, resp http.ResponseWriter) error { if len(policyRefs) > 0 { req, err := copyRequest(req) if err != nil { @@ -204,7 +195,7 @@ func (v *OIDCTokenVerifier) verifyAuthZ(ctx context.Context, features feature.Fl } // verifyJWT verifies the given JWT for the expected audience and returns the parsed ID token. -func (v *OIDCTokenVerifier) verifyJWT(ctx context.Context, jwt, audience string) (*IDToken, error) { +func (v *Verifier) verifyJWT(ctx context.Context, jwt, audience string) (*IDToken, error) { if v.provider == nil { return nil, fmt.Errorf("provider is nil. Is the OIDC provider config correct?") } @@ -228,7 +219,7 @@ func (v *OIDCTokenVerifier) verifyJWT(ctx context.Context, jwt, audience string) }, nil } -func (v *OIDCTokenVerifier) initOIDCProvider(ctx context.Context) error { +func (v *Verifier) initOIDCProvider(ctx context.Context) error { discovery, err := v.getKubernetesOIDCDiscovery() if err != nil { return fmt.Errorf("could not load Kubernetes OIDC discovery information: %w", err) @@ -256,7 +247,7 @@ func (v *OIDCTokenVerifier) initOIDCProvider(ctx context.Context) error { return nil } -func (v *OIDCTokenVerifier) getHTTPClientForKubeAPIServer() (*http.Client, error) { +func (v *Verifier) getHTTPClientForKubeAPIServer() (*http.Client, error) { client, err := rest.HTTPClientFor(v.restConfig) if err != nil { return nil, fmt.Errorf("could not create HTTP client from rest config: %w", err) @@ -265,7 +256,7 @@ func (v *OIDCTokenVerifier) getHTTPClientForKubeAPIServer() (*http.Client, error return client, nil } -func (v *OIDCTokenVerifier) getKubernetesOIDCDiscovery() (*openIDMetadata, error) { +func (v *Verifier) getKubernetesOIDCDiscovery() (*openIDMetadata, error) { client, err := v.getHTTPClientForKubeAPIServer() if err != nil { return nil, fmt.Errorf("could not get HTTP client for API server: %w", err) diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/interface.go deleted file mode 100644 index 760bafcec..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/interface.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package eventing - -import ( - v1 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1" - v1alpha1 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1" - v1beta1 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1" - v1beta2 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2" - v1beta3 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface - // V1beta1 provides access to shared informers for resources in V1beta1. - V1beta1() v1beta1.Interface - // V1beta2 provides access to shared informers for resources in V1beta2. - V1beta2() v1beta2.Interface - // V1beta3 provides access to shared informers for resources in V1beta3. - V1beta3() v1beta3.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1beta1 returns a new v1beta1.Interface. -func (g *group) V1beta1() v1beta1.Interface { - return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1beta2 returns a new v1beta2.Interface. -func (g *group) V1beta2() v1beta2.Interface { - return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1beta3 returns a new v1beta3.Interface. -func (g *group) V1beta3() v1beta3.Interface { - return v1beta3.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go deleted file mode 100644 index a57851c82..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/broker.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/eventing/v1" -) - -// BrokerInformer provides access to a shared informer and lister for -// Brokers. -type BrokerInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.BrokerLister -} - -type brokerInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewBrokerInformer constructs a new informer for Broker type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewBrokerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredBrokerInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredBrokerInformer constructs a new informer for Broker type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredBrokerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1().Brokers(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1().Brokers(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1.Broker{}, - resyncPeriod, - indexers, - ) -} - -func (f *brokerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredBrokerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *brokerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1.Broker{}, f.defaultInformer) -} - -func (f *brokerInformer) Lister() v1.BrokerLister { - return v1.NewBrokerLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/interface.go deleted file mode 100644 index e5e26d821..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/interface.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Brokers returns a BrokerInformer. - Brokers() BrokerInformer - // Triggers returns a TriggerInformer. - Triggers() TriggerInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// Brokers returns a BrokerInformer. -func (v *version) Brokers() BrokerInformer { - return &brokerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Triggers returns a TriggerInformer. -func (v *version) Triggers() TriggerInformer { - return &triggerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go deleted file mode 100644 index 1faa3422a..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1/trigger.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/eventing/v1" -) - -// TriggerInformer provides access to a shared informer and lister for -// Triggers. -type TriggerInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.TriggerLister -} - -type triggerInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewTriggerInformer constructs a new informer for Trigger type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredTriggerInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredTriggerInformer constructs a new informer for Trigger type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredTriggerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1().Triggers(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1().Triggers(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1.Trigger{}, - resyncPeriod, - indexers, - ) -} - -func (f *triggerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredTriggerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *triggerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1.Trigger{}, f.defaultInformer) -} - -func (f *triggerInformer) Lister() v1.TriggerLister { - return v1.NewTriggerLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/eventpolicy.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/eventpolicy.go deleted file mode 100644 index df3b47e26..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/eventpolicy.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1alpha1 "knative.dev/eventing/pkg/apis/eventing/v1alpha1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "knative.dev/eventing/pkg/client/listers/eventing/v1alpha1" -) - -// EventPolicyInformer provides access to a shared informer and lister for -// EventPolicies. -type EventPolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.EventPolicyLister -} - -type eventPolicyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewEventPolicyInformer constructs a new informer for EventPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEventPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredEventPolicyInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredEventPolicyInformer constructs a new informer for EventPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredEventPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1alpha1().EventPolicies(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1alpha1().EventPolicies(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1alpha1.EventPolicy{}, - resyncPeriod, - indexers, - ) -} - -func (f *eventPolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredEventPolicyInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *eventPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1alpha1.EventPolicy{}, f.defaultInformer) -} - -func (f *eventPolicyInformer) Lister() v1alpha1.EventPolicyLister { - return v1alpha1.NewEventPolicyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/interface.go deleted file mode 100644 index 89263c258..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // EventPolicies returns a EventPolicyInformer. - EventPolicies() EventPolicyInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// EventPolicies returns a EventPolicyInformer. -func (v *version) EventPolicies() EventPolicyInformer { - return &eventPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go deleted file mode 100644 index 920a7005e..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/eventtype.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "knative.dev/eventing/pkg/client/listers/eventing/v1beta1" -) - -// EventTypeInformer provides access to a shared informer and lister for -// EventTypes. -type EventTypeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta1.EventTypeLister -} - -type eventTypeInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta1().EventTypes(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta1().EventTypes(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1beta1.EventType{}, - resyncPeriod, - indexers, - ) -} - -func (f *eventTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *eventTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1beta1.EventType{}, f.defaultInformer) -} - -func (f *eventTypeInformer) Lister() v1beta1.EventTypeLister { - return v1beta1.NewEventTypeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/interface.go deleted file mode 100644 index a9473f823..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // EventTypes returns a EventTypeInformer. - EventTypes() EventTypeInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// EventTypes returns a EventTypeInformer. -func (v *version) EventTypes() EventTypeInformer { - return &eventTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/eventtype.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/eventtype.go deleted file mode 100644 index 9a4c65255..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/eventtype.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1beta2 "knative.dev/eventing/pkg/apis/eventing/v1beta2" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1beta2 "knative.dev/eventing/pkg/client/listers/eventing/v1beta2" -) - -// EventTypeInformer provides access to a shared informer and lister for -// EventTypes. -type EventTypeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta2.EventTypeLister -} - -type eventTypeInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta2().EventTypes(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta2().EventTypes(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1beta2.EventType{}, - resyncPeriod, - indexers, - ) -} - -func (f *eventTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *eventTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1beta2.EventType{}, f.defaultInformer) -} - -func (f *eventTypeInformer) Lister() v1beta2.EventTypeLister { - return v1beta2.NewEventTypeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/interface.go deleted file mode 100644 index 98f69b73e..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta2 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // EventTypes returns a EventTypeInformer. - EventTypes() EventTypeInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// EventTypes returns a EventTypeInformer. -func (v *version) EventTypes() EventTypeInformer { - return &eventTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/eventtype.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/eventtype.go deleted file mode 100644 index 46eb0753f..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/eventtype.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta3 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - eventingv1beta3 "knative.dev/eventing/pkg/apis/eventing/v1beta3" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1beta3 "knative.dev/eventing/pkg/client/listers/eventing/v1beta3" -) - -// EventTypeInformer provides access to a shared informer and lister for -// EventTypes. -type EventTypeInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta3.EventTypeLister -} - -type eventTypeInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredEventTypeInformer constructs a new informer for EventType type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredEventTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta3().EventTypes(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.EventingV1beta3().EventTypes(namespace).Watch(context.TODO(), options) - }, - }, - &eventingv1beta3.EventType{}, - resyncPeriod, - indexers, - ) -} - -func (f *eventTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredEventTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *eventTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&eventingv1beta3.EventType{}, f.defaultInformer) -} - -func (f *eventTypeInformer) Lister() v1beta3.EventTypeLister { - return v1beta3.NewEventTypeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/interface.go deleted file mode 100644 index 791ed817e..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta3 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // EventTypes returns a EventTypeInformer. - EventTypes() EventTypeInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// EventTypes returns a EventTypeInformer. -func (v *version) EventTypes() EventTypeInformer { - return &eventTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/factory.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/factory.go deleted file mode 100644 index 634f7f6a3..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/factory.go +++ /dev/null @@ -1,285 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - reflect "reflect" - sync "sync" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - eventing "knative.dev/eventing/pkg/client/informers/externalversions/eventing" - flows "knative.dev/eventing/pkg/client/informers/externalversions/flows" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - messaging "knative.dev/eventing/pkg/client/informers/externalversions/messaging" - sinks "knative.dev/eventing/pkg/client/informers/externalversions/sinks" - sources "knative.dev/eventing/pkg/client/informers/externalversions/sources" -) - -// SharedInformerOption defines the functional option type for SharedInformerFactory. -type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory - -type sharedInformerFactory struct { - client versioned.Interface - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - transform cache.TransformFunc - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool - // wg tracks how many goroutines were started. - wg sync.WaitGroup - // shuttingDown is true when Shutdown has been called. It may still be running - // because it needs to wait for goroutines. - shuttingDown bool -} - -// WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - for k, v := range resyncConfig { - factory.customResync[reflect.TypeOf(k)] = v - } - return factory - } -} - -// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. -func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.tweakListOptions = tweakListOptions - return factory - } -} - -// WithNamespace limits the SharedInformerFactory to the specified namespace. -func WithNamespace(namespace string) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.namespace = namespace - return factory - } -} - -// WithTransform sets a transform on all informers. -func WithTransform(transform cache.TransformFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.transform = transform - return factory - } -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -// Deprecated: Please use NewSharedInformerFactoryWithOptions instead -func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) -} - -// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { - factory := &sharedInformerFactory{ - client: client, - namespace: v1.NamespaceAll, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - factory = opt(factory) - } - - return factory -} - -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.shuttingDown { - return - } - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - f.wg.Add(1) - // We need a new variable in each loop iteration, - // otherwise the goroutine would use the loop variable - // and that keeps changing. - informer := informer - go func() { - defer f.wg.Done() - informer.Run(stopCh) - }() - f.startedInformers[informerType] = true - } - } -} - -func (f *sharedInformerFactory) Shutdown() { - f.lock.Lock() - f.shuttingDown = true - f.lock.Unlock() - - // Will return immediately if there is nothing to wait for. - f.wg.Wait() -} - -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - informer.SetTransform(f.transform) - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -// -// It is typically used like this: -// -// ctx, cancel := context.Background() -// defer cancel() -// factory := NewSharedInformerFactory(client, resyncPeriod) -// defer factory.WaitForStop() // Returns immediately if nothing was started. -// genericInformer := factory.ForResource(resource) -// typedInformer := factory.SomeAPIGroup().V1().SomeType() -// factory.Start(ctx.Done()) // Start processing these informers. -// synced := factory.WaitForCacheSync(ctx.Done()) -// for v, ok := range synced { -// if !ok { -// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) -// return -// } -// } -// -// // Creating informers can also be created after Start, but then -// // Start must be called again: -// anotherGenericInformer := factory.ForResource(resource) -// factory.Start(ctx.Done()) -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - - // Start initializes all requested informers. They are handled in goroutines - // which run until the stop channel gets closed. - Start(stopCh <-chan struct{}) - - // Shutdown marks a factory as shutting down. At that point no new - // informers can be started anymore and Start will return without - // doing anything. - // - // In addition, Shutdown blocks until all goroutines have terminated. For that - // to happen, the close channel(s) that they were started with must be closed, - // either before Shutdown gets called or while it is waiting. - // - // Shutdown may be called multiple times, even concurrently. All such calls will - // block until all goroutines have terminated. - Shutdown() - - // WaitForCacheSync blocks until all started informers' caches were synced - // or the stop channel gets closed. - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - // ForResource gives generic access to a shared informer of the matching type. - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - - // InformerFor returns the SharedIndexInformer for obj using an internal - // client. - InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer - - Eventing() eventing.Interface - Flows() flows.Interface - Messaging() messaging.Interface - Sinks() sinks.Interface - Sources() sources.Interface -} - -func (f *sharedInformerFactory) Eventing() eventing.Interface { - return eventing.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Flows() flows.Interface { - return flows.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Messaging() messaging.Interface { - return messaging.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Sinks() sinks.Interface { - return sinks.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Sources() sources.Interface { - return sources.New(f, f.namespace, f.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/interface.go deleted file mode 100644 index 99a7163ed..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package flows - -import ( - v1 "knative.dev/eventing/pkg/client/informers/externalversions/flows/v1" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/interface.go deleted file mode 100644 index 520cd36c6..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/interface.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Parallels returns a ParallelInformer. - Parallels() ParallelInformer - // Sequences returns a SequenceInformer. - Sequences() SequenceInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// Parallels returns a ParallelInformer. -func (v *version) Parallels() ParallelInformer { - return ¶llelInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Sequences returns a SequenceInformer. -func (v *version) Sequences() SequenceInformer { - return &sequenceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go deleted file mode 100644 index 886563397..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/parallel.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/flows/v1" -) - -// ParallelInformer provides access to a shared informer and lister for -// Parallels. -type ParallelInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ParallelLister -} - -type parallelInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewParallelInformer constructs a new informer for Parallel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewParallelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredParallelInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredParallelInformer constructs a new informer for Parallel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredParallelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.FlowsV1().Parallels(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.FlowsV1().Parallels(namespace).Watch(context.TODO(), options) - }, - }, - &flowsv1.Parallel{}, - resyncPeriod, - indexers, - ) -} - -func (f *parallelInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredParallelInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *parallelInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&flowsv1.Parallel{}, f.defaultInformer) -} - -func (f *parallelInformer) Lister() v1.ParallelLister { - return v1.NewParallelLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go deleted file mode 100644 index 1275dda3b..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/flows/v1/sequence.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/flows/v1" -) - -// SequenceInformer provides access to a shared informer and lister for -// Sequences. -type SequenceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SequenceLister -} - -type sequenceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewSequenceInformer constructs a new informer for Sequence type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSequenceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSequenceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredSequenceInformer constructs a new informer for Sequence type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSequenceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.FlowsV1().Sequences(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.FlowsV1().Sequences(namespace).Watch(context.TODO(), options) - }, - }, - &flowsv1.Sequence{}, - resyncPeriod, - indexers, - ) -} - -func (f *sequenceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSequenceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *sequenceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&flowsv1.Sequence{}, f.defaultInformer) -} - -func (f *sequenceInformer) Lister() v1.SequenceLister { - return v1.NewSequenceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/generic.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/generic.go deleted file mode 100644 index 41c490e06..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/generic.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - "fmt" - - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/eventing/v1" - v1alpha1 "knative.dev/eventing/pkg/apis/eventing/v1alpha1" - v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" - v1beta2 "knative.dev/eventing/pkg/apis/eventing/v1beta2" - v1beta3 "knative.dev/eventing/pkg/apis/eventing/v1beta3" - flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - sinksv1alpha1 "knative.dev/eventing/pkg/apis/sinks/v1alpha1" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" - sourcesv1beta2 "knative.dev/eventing/pkg/apis/sources/v1beta2" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=eventing.knative.dev, Version=v1 - case v1.SchemeGroupVersion.WithResource("brokers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1().Brokers().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("triggers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1().Triggers().Informer()}, nil - - // Group=eventing.knative.dev, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("eventpolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1alpha1().EventPolicies().Informer()}, nil - - // Group=eventing.knative.dev, Version=v1beta1 - case v1beta1.SchemeGroupVersion.WithResource("eventtypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1beta1().EventTypes().Informer()}, nil - - // Group=eventing.knative.dev, Version=v1beta2 - case v1beta2.SchemeGroupVersion.WithResource("eventtypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1beta2().EventTypes().Informer()}, nil - - // Group=eventing.knative.dev, Version=v1beta3 - case v1beta3.SchemeGroupVersion.WithResource("eventtypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Eventing().V1beta3().EventTypes().Informer()}, nil - - // Group=flows.knative.dev, Version=v1 - case flowsv1.SchemeGroupVersion.WithResource("parallels"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Flows().V1().Parallels().Informer()}, nil - case flowsv1.SchemeGroupVersion.WithResource("sequences"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Flows().V1().Sequences().Informer()}, nil - - // Group=messaging.knative.dev, Version=v1 - case messagingv1.SchemeGroupVersion.WithResource("channels"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Messaging().V1().Channels().Informer()}, nil - case messagingv1.SchemeGroupVersion.WithResource("inmemorychannels"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Messaging().V1().InMemoryChannels().Informer()}, nil - case messagingv1.SchemeGroupVersion.WithResource("subscriptions"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Messaging().V1().Subscriptions().Informer()}, nil - - // Group=sinks.knative.dev, Version=v1alpha1 - case sinksv1alpha1.SchemeGroupVersion.WithResource("jobsinks"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sinks().V1alpha1().JobSinks().Informer()}, nil - - // Group=sources.knative.dev, Version=v1 - case sourcesv1.SchemeGroupVersion.WithResource("apiserversources"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1().ApiServerSources().Informer()}, nil - case sourcesv1.SchemeGroupVersion.WithResource("containersources"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1().ContainerSources().Informer()}, nil - case sourcesv1.SchemeGroupVersion.WithResource("pingsources"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1().PingSources().Informer()}, nil - case sourcesv1.SchemeGroupVersion.WithResource("sinkbindings"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1().SinkBindings().Informer()}, nil - - // Group=sources.knative.dev, Version=v1beta2 - case sourcesv1beta2.SchemeGroupVersion.WithResource("pingsources"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Sources().V1beta2().PingSources().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index e38af6306..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package internalinterfaces - -import ( - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" -) - -// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. -type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer -} - -// TweakListOptionsFunc is a function that transforms a v1.ListOptions. -type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/interface.go deleted file mode 100644 index 8a38f95bf..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package messaging - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go deleted file mode 100644 index 78daf2848..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/channel.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/messaging/v1" -) - -// ChannelInformer provides access to a shared informer and lister for -// Channels. -type ChannelInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ChannelLister -} - -type channelInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewChannelInformer constructs a new informer for Channel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewChannelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredChannelInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredChannelInformer constructs a new informer for Channel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredChannelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().Channels(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().Channels(namespace).Watch(context.TODO(), options) - }, - }, - &messagingv1.Channel{}, - resyncPeriod, - indexers, - ) -} - -func (f *channelInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredChannelInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *channelInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&messagingv1.Channel{}, f.defaultInformer) -} - -func (f *channelInformer) Lister() v1.ChannelLister { - return v1.NewChannelLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go deleted file mode 100644 index 2d19c29ef..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/inmemorychannel.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/messaging/v1" -) - -// InMemoryChannelInformer provides access to a shared informer and lister for -// InMemoryChannels. -type InMemoryChannelInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.InMemoryChannelLister -} - -type inMemoryChannelInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewInMemoryChannelInformer constructs a new informer for InMemoryChannel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInMemoryChannelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredInMemoryChannelInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredInMemoryChannelInformer constructs a new informer for InMemoryChannel type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInMemoryChannelInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().InMemoryChannels(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().InMemoryChannels(namespace).Watch(context.TODO(), options) - }, - }, - &messagingv1.InMemoryChannel{}, - resyncPeriod, - indexers, - ) -} - -func (f *inMemoryChannelInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredInMemoryChannelInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *inMemoryChannelInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&messagingv1.InMemoryChannel{}, f.defaultInformer) -} - -func (f *inMemoryChannelInformer) Lister() v1.InMemoryChannelLister { - return v1.NewInMemoryChannelLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/interface.go deleted file mode 100644 index 2165d9cc6..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/interface.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Channels returns a ChannelInformer. - Channels() ChannelInformer - // InMemoryChannels returns a InMemoryChannelInformer. - InMemoryChannels() InMemoryChannelInformer - // Subscriptions returns a SubscriptionInformer. - Subscriptions() SubscriptionInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// Channels returns a ChannelInformer. -func (v *version) Channels() ChannelInformer { - return &channelInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// InMemoryChannels returns a InMemoryChannelInformer. -func (v *version) InMemoryChannels() InMemoryChannelInformer { - return &inMemoryChannelInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Subscriptions returns a SubscriptionInformer. -func (v *version) Subscriptions() SubscriptionInformer { - return &subscriptionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go deleted file mode 100644 index bedff1663..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1/subscription.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/messaging/v1" -) - -// SubscriptionInformer provides access to a shared informer and lister for -// Subscriptions. -type SubscriptionInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SubscriptionLister -} - -type subscriptionInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewSubscriptionInformer constructs a new informer for Subscription type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSubscriptionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSubscriptionInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredSubscriptionInformer constructs a new informer for Subscription type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSubscriptionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().Subscriptions(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MessagingV1().Subscriptions(namespace).Watch(context.TODO(), options) - }, - }, - &messagingv1.Subscription{}, - resyncPeriod, - indexers, - ) -} - -func (f *subscriptionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSubscriptionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *subscriptionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&messagingv1.Subscription{}, f.defaultInformer) -} - -func (f *subscriptionInformer) Lister() v1.SubscriptionLister { - return v1.NewSubscriptionLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/interface.go deleted file mode 100644 index f09f6846b..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package sinks - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/interface.go deleted file mode 100644 index 68ed173ac..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // JobSinks returns a JobSinkInformer. - JobSinks() JobSinkInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// JobSinks returns a JobSinkInformer. -func (v *version) JobSinks() JobSinkInformer { - return &jobSinkInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/jobsink.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/jobsink.go deleted file mode 100644 index 5278c858b..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1/jobsink.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sinksv1alpha1 "knative.dev/eventing/pkg/apis/sinks/v1alpha1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "knative.dev/eventing/pkg/client/listers/sinks/v1alpha1" -) - -// JobSinkInformer provides access to a shared informer and lister for -// JobSinks. -type JobSinkInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.JobSinkLister -} - -type jobSinkInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewJobSinkInformer constructs a new informer for JobSink type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewJobSinkInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredJobSinkInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredJobSinkInformer constructs a new informer for JobSink type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredJobSinkInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SinksV1alpha1().JobSinks(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SinksV1alpha1().JobSinks(namespace).Watch(context.TODO(), options) - }, - }, - &sinksv1alpha1.JobSink{}, - resyncPeriod, - indexers, - ) -} - -func (f *jobSinkInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredJobSinkInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *jobSinkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sinksv1alpha1.JobSink{}, f.defaultInformer) -} - -func (f *jobSinkInformer) Lister() v1alpha1.JobSinkLister { - return v1alpha1.NewJobSinkLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/interface.go deleted file mode 100644 index c8b638594..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/interface.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package sources - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/informers/externalversions/sources/v1" - v1beta2 "knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface - // V1beta2 provides access to shared informers for resources in V1beta2. - V1beta2() v1beta2.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1beta2 returns a new v1beta2.Interface. -func (g *group) V1beta2() v1beta2.Interface { - return v1beta2.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/apiserversource.go deleted file mode 100644 index 501c2cdf6..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/apiserversource.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/sources/v1" -) - -// ApiServerSourceInformer provides access to a shared informer and lister for -// ApiServerSources. -type ApiServerSourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ApiServerSourceLister -} - -type apiServerSourceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewApiServerSourceInformer constructs a new informer for ApiServerSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewApiServerSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredApiServerSourceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredApiServerSourceInformer constructs a new informer for ApiServerSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredApiServerSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().ApiServerSources(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().ApiServerSources(namespace).Watch(context.TODO(), options) - }, - }, - &sourcesv1.ApiServerSource{}, - resyncPeriod, - indexers, - ) -} - -func (f *apiServerSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredApiServerSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *apiServerSourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1.ApiServerSource{}, f.defaultInformer) -} - -func (f *apiServerSourceInformer) Lister() v1.ApiServerSourceLister { - return v1.NewApiServerSourceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/containersource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/containersource.go deleted file mode 100644 index 67de322d6..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/containersource.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/sources/v1" -) - -// ContainerSourceInformer provides access to a shared informer and lister for -// ContainerSources. -type ContainerSourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.ContainerSourceLister -} - -type containerSourceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewContainerSourceInformer constructs a new informer for ContainerSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewContainerSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredContainerSourceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredContainerSourceInformer constructs a new informer for ContainerSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredContainerSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().ContainerSources(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().ContainerSources(namespace).Watch(context.TODO(), options) - }, - }, - &sourcesv1.ContainerSource{}, - resyncPeriod, - indexers, - ) -} - -func (f *containerSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredContainerSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *containerSourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1.ContainerSource{}, f.defaultInformer) -} - -func (f *containerSourceInformer) Lister() v1.ContainerSourceLister { - return v1.NewContainerSourceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/interface.go deleted file mode 100644 index f5fd4ee59..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/interface.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // ApiServerSources returns a ApiServerSourceInformer. - ApiServerSources() ApiServerSourceInformer - // ContainerSources returns a ContainerSourceInformer. - ContainerSources() ContainerSourceInformer - // PingSources returns a PingSourceInformer. - PingSources() PingSourceInformer - // SinkBindings returns a SinkBindingInformer. - SinkBindings() SinkBindingInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// ApiServerSources returns a ApiServerSourceInformer. -func (v *version) ApiServerSources() ApiServerSourceInformer { - return &apiServerSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// ContainerSources returns a ContainerSourceInformer. -func (v *version) ContainerSources() ContainerSourceInformer { - return &containerSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// PingSources returns a PingSourceInformer. -func (v *version) PingSources() PingSourceInformer { - return &pingSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// SinkBindings returns a SinkBindingInformer. -func (v *version) SinkBindings() SinkBindingInformer { - return &sinkBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/pingsource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/pingsource.go deleted file mode 100644 index f4a274ad1..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/pingsource.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/sources/v1" -) - -// PingSourceInformer provides access to a shared informer and lister for -// PingSources. -type PingSourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.PingSourceLister -} - -type pingSourceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewPingSourceInformer constructs a new informer for PingSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPingSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredPingSourceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredPingSourceInformer constructs a new informer for PingSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredPingSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().PingSources(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().PingSources(namespace).Watch(context.TODO(), options) - }, - }, - &sourcesv1.PingSource{}, - resyncPeriod, - indexers, - ) -} - -func (f *pingSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredPingSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *pingSourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1.PingSource{}, f.defaultInformer) -} - -func (f *pingSourceInformer) Lister() v1.PingSourceLister { - return v1.NewPingSourceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/sinkbinding.go deleted file mode 100644 index 035805262..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1/sinkbinding.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1 "knative.dev/eventing/pkg/client/listers/sources/v1" -) - -// SinkBindingInformer provides access to a shared informer and lister for -// SinkBindings. -type SinkBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.SinkBindingLister -} - -type sinkBindingInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewSinkBindingInformer constructs a new informer for SinkBinding type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSinkBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredSinkBindingInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredSinkBindingInformer constructs a new informer for SinkBinding type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSinkBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().SinkBindings(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1().SinkBindings(namespace).Watch(context.TODO(), options) - }, - }, - &sourcesv1.SinkBinding{}, - resyncPeriod, - indexers, - ) -} - -func (f *sinkBindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredSinkBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *sinkBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1.SinkBinding{}, f.defaultInformer) -} - -func (f *sinkBindingInformer) Lister() v1.SinkBindingLister { - return v1.NewSinkBindingLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/interface.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/interface.go deleted file mode 100644 index 14c34076e..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/interface.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta2 - -import ( - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // PingSources returns a PingSourceInformer. - PingSources() PingSourceInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// PingSources returns a PingSourceInformer. -func (v *version) PingSources() PingSourceInformer { - return &pingSourceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/pingsource.go b/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/pingsource.go deleted file mode 100644 index 41a264784..000000000 --- a/vendor/knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2/pingsource.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "context" - time "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" - sourcesv1beta2 "knative.dev/eventing/pkg/apis/sources/v1beta2" - versioned "knative.dev/eventing/pkg/client/clientset/versioned" - internalinterfaces "knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1beta2 "knative.dev/eventing/pkg/client/listers/sources/v1beta2" -) - -// PingSourceInformer provides access to a shared informer and lister for -// PingSources. -type PingSourceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1beta2.PingSourceLister -} - -type pingSourceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewPingSourceInformer constructs a new informer for PingSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPingSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredPingSourceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredPingSourceInformer constructs a new informer for PingSource type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredPingSourceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1beta2().PingSources(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.SourcesV1beta2().PingSources(namespace).Watch(context.TODO(), options) - }, - }, - &sourcesv1beta2.PingSource{}, - resyncPeriod, - indexers, - ) -} - -func (f *pingSourceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredPingSourceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *pingSourceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sourcesv1beta2.PingSource{}, f.defaultInformer) -} - -func (f *pingSourceInformer) Lister() v1beta2.PingSourceLister { - return v1beta2.NewPingSourceLister(f.Informer().GetIndexer()) -} diff --git a/vendor/knative.dev/eventing/pkg/client/injection/informers/eventing/v1alpha1/eventpolicy/eventpolicy.go b/vendor/knative.dev/eventing/pkg/client/injection/informers/eventing/v1alpha1/eventpolicy/eventpolicy.go deleted file mode 100644 index c6da95f0a..000000000 --- a/vendor/knative.dev/eventing/pkg/client/injection/informers/eventing/v1alpha1/eventpolicy/eventpolicy.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package eventpolicy - -import ( - context "context" - - v1alpha1 "knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1" - factory "knative.dev/eventing/pkg/client/injection/informers/factory" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" - logging "knative.dev/pkg/logging" -) - -func init() { - injection.Default.RegisterInformer(withInformer) -} - -// Key is used for associating the Informer inside the context.Context. -type Key struct{} - -func withInformer(ctx context.Context) (context.Context, controller.Informer) { - f := factory.Get(ctx) - inf := f.Eventing().V1alpha1().EventPolicies() - return context.WithValue(ctx, Key{}, inf), inf.Informer() -} - -// Get extracts the typed informer from the context. -func Get(ctx context.Context) v1alpha1.EventPolicyInformer { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1.EventPolicyInformer from context.") - } - return untyped.(v1alpha1.EventPolicyInformer) -} diff --git a/vendor/knative.dev/eventing/pkg/client/injection/informers/factory/factory.go b/vendor/knative.dev/eventing/pkg/client/injection/informers/factory/factory.go deleted file mode 100644 index 66413ebac..000000000 --- a/vendor/knative.dev/eventing/pkg/client/injection/informers/factory/factory.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by injection-gen. DO NOT EDIT. - -package factory - -import ( - context "context" - - externalversions "knative.dev/eventing/pkg/client/informers/externalversions" - client "knative.dev/eventing/pkg/client/injection/client" - controller "knative.dev/pkg/controller" - injection "knative.dev/pkg/injection" - logging "knative.dev/pkg/logging" -) - -func init() { - injection.Default.RegisterInformerFactory(withInformerFactory) -} - -// Key is used as the key for associating information with a context.Context. -type Key struct{} - -func withInformerFactory(ctx context.Context) context.Context { - c := client.Get(ctx) - opts := make([]externalversions.SharedInformerOption, 0, 1) - if injection.HasNamespaceScope(ctx) { - opts = append(opts, externalversions.WithNamespace(injection.GetNamespaceScope(ctx))) - } - return context.WithValue(ctx, Key{}, - externalversions.NewSharedInformerFactoryWithOptions(c, controller.GetResyncPeriod(ctx), opts...)) -} - -// Get extracts the InformerFactory from the context. -func Get(ctx context.Context) externalversions.SharedInformerFactory { - untyped := ctx.Value(Key{}) - if untyped == nil { - logging.FromContext(ctx).Panic( - "Unable to fetch knative.dev/eventing/pkg/client/informers/externalversions.SharedInformerFactory from context.") - } - return untyped.(externalversions.SharedInformerFactory) -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/broker.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/broker.go deleted file mode 100644 index a34e9a01f..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/broker.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/eventing/v1" -) - -// BrokerLister helps list Brokers. -// All objects returned here must be treated as read-only. -type BrokerLister interface { - // List lists all Brokers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Broker, err error) - // Brokers returns an object that can list and get Brokers. - Brokers(namespace string) BrokerNamespaceLister - BrokerListerExpansion -} - -// brokerLister implements the BrokerLister interface. -type brokerLister struct { - indexer cache.Indexer -} - -// NewBrokerLister returns a new BrokerLister. -func NewBrokerLister(indexer cache.Indexer) BrokerLister { - return &brokerLister{indexer: indexer} -} - -// List lists all Brokers in the indexer. -func (s *brokerLister) List(selector labels.Selector) (ret []*v1.Broker, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Broker)) - }) - return ret, err -} - -// Brokers returns an object that can list and get Brokers. -func (s *brokerLister) Brokers(namespace string) BrokerNamespaceLister { - return brokerNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// BrokerNamespaceLister helps list and get Brokers. -// All objects returned here must be treated as read-only. -type BrokerNamespaceLister interface { - // List lists all Brokers in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Broker, err error) - // Get retrieves the Broker from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Broker, error) - BrokerNamespaceListerExpansion -} - -// brokerNamespaceLister implements the BrokerNamespaceLister -// interface. -type brokerNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Brokers in the indexer for a given namespace. -func (s brokerNamespaceLister) List(selector labels.Selector) (ret []*v1.Broker, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Broker)) - }) - return ret, err -} - -// Get retrieves the Broker from the indexer for a given namespace and name. -func (s brokerNamespaceLister) Get(name string) (*v1.Broker, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("broker"), name) - } - return obj.(*v1.Broker), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/expansion_generated.go deleted file mode 100644 index 249909354..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/expansion_generated.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// BrokerListerExpansion allows custom methods to be added to -// BrokerLister. -type BrokerListerExpansion interface{} - -// BrokerNamespaceListerExpansion allows custom methods to be added to -// BrokerNamespaceLister. -type BrokerNamespaceListerExpansion interface{} - -// TriggerListerExpansion allows custom methods to be added to -// TriggerLister. -type TriggerListerExpansion interface{} - -// TriggerNamespaceListerExpansion allows custom methods to be added to -// TriggerNamespaceLister. -type TriggerNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/trigger.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/trigger.go deleted file mode 100644 index 28aef21d2..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1/trigger.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/eventing/v1" -) - -// TriggerLister helps list Triggers. -// All objects returned here must be treated as read-only. -type TriggerLister interface { - // List lists all Triggers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Trigger, err error) - // Triggers returns an object that can list and get Triggers. - Triggers(namespace string) TriggerNamespaceLister - TriggerListerExpansion -} - -// triggerLister implements the TriggerLister interface. -type triggerLister struct { - indexer cache.Indexer -} - -// NewTriggerLister returns a new TriggerLister. -func NewTriggerLister(indexer cache.Indexer) TriggerLister { - return &triggerLister{indexer: indexer} -} - -// List lists all Triggers in the indexer. -func (s *triggerLister) List(selector labels.Selector) (ret []*v1.Trigger, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Trigger)) - }) - return ret, err -} - -// Triggers returns an object that can list and get Triggers. -func (s *triggerLister) Triggers(namespace string) TriggerNamespaceLister { - return triggerNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// TriggerNamespaceLister helps list and get Triggers. -// All objects returned here must be treated as read-only. -type TriggerNamespaceLister interface { - // List lists all Triggers in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Trigger, err error) - // Get retrieves the Trigger from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Trigger, error) - TriggerNamespaceListerExpansion -} - -// triggerNamespaceLister implements the TriggerNamespaceLister -// interface. -type triggerNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Triggers in the indexer for a given namespace. -func (s triggerNamespaceLister) List(selector labels.Selector) (ret []*v1.Trigger, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Trigger)) - }) - return ret, err -} - -// Get retrieves the Trigger from the indexer for a given namespace and name. -func (s triggerNamespaceLister) Get(name string) (*v1.Trigger, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("trigger"), name) - } - return obj.(*v1.Trigger), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/eventtype.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/eventtype.go deleted file mode 100644 index 3dbf79b88..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/eventtype.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1" -) - -// EventTypeLister helps list EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeLister interface { - // List lists all EventTypes in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.EventType, err error) - // EventTypes returns an object that can list and get EventTypes. - EventTypes(namespace string) EventTypeNamespaceLister - EventTypeListerExpansion -} - -// eventTypeLister implements the EventTypeLister interface. -type eventTypeLister struct { - indexer cache.Indexer -} - -// NewEventTypeLister returns a new EventTypeLister. -func NewEventTypeLister(indexer cache.Indexer) EventTypeLister { - return &eventTypeLister{indexer: indexer} -} - -// List lists all EventTypes in the indexer. -func (s *eventTypeLister) List(selector labels.Selector) (ret []*v1beta1.EventType, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.EventType)) - }) - return ret, err -} - -// EventTypes returns an object that can list and get EventTypes. -func (s *eventTypeLister) EventTypes(namespace string) EventTypeNamespaceLister { - return eventTypeNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// EventTypeNamespaceLister helps list and get EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeNamespaceLister interface { - // List lists all EventTypes in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.EventType, err error) - // Get retrieves the EventType from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.EventType, error) - EventTypeNamespaceListerExpansion -} - -// eventTypeNamespaceLister implements the EventTypeNamespaceLister -// interface. -type eventTypeNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all EventTypes in the indexer for a given namespace. -func (s eventTypeNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.EventType, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.EventType)) - }) - return ret, err -} - -// Get retrieves the EventType from the indexer for a given namespace and name. -func (s eventTypeNamespaceLister) Get(name string) (*v1beta1.EventType, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("eventtype"), name) - } - return obj.(*v1beta1.EventType), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/expansion_generated.go deleted file mode 100644 index 8048b1f4c..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta1/expansion_generated.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta1 - -// EventTypeListerExpansion allows custom methods to be added to -// EventTypeLister. -type EventTypeListerExpansion interface{} - -// EventTypeNamespaceListerExpansion allows custom methods to be added to -// EventTypeNamespaceLister. -type EventTypeNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/eventtype.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/eventtype.go deleted file mode 100644 index 4f84cd924..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/eventtype.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1beta2 "knative.dev/eventing/pkg/apis/eventing/v1beta2" -) - -// EventTypeLister helps list EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeLister interface { - // List lists all EventTypes in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta2.EventType, err error) - // EventTypes returns an object that can list and get EventTypes. - EventTypes(namespace string) EventTypeNamespaceLister - EventTypeListerExpansion -} - -// eventTypeLister implements the EventTypeLister interface. -type eventTypeLister struct { - indexer cache.Indexer -} - -// NewEventTypeLister returns a new EventTypeLister. -func NewEventTypeLister(indexer cache.Indexer) EventTypeLister { - return &eventTypeLister{indexer: indexer} -} - -// List lists all EventTypes in the indexer. -func (s *eventTypeLister) List(selector labels.Selector) (ret []*v1beta2.EventType, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta2.EventType)) - }) - return ret, err -} - -// EventTypes returns an object that can list and get EventTypes. -func (s *eventTypeLister) EventTypes(namespace string) EventTypeNamespaceLister { - return eventTypeNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// EventTypeNamespaceLister helps list and get EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeNamespaceLister interface { - // List lists all EventTypes in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta2.EventType, err error) - // Get retrieves the EventType from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1beta2.EventType, error) - EventTypeNamespaceListerExpansion -} - -// eventTypeNamespaceLister implements the EventTypeNamespaceLister -// interface. -type eventTypeNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all EventTypes in the indexer for a given namespace. -func (s eventTypeNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.EventType, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta2.EventType)) - }) - return ret, err -} - -// Get retrieves the EventType from the indexer for a given namespace and name. -func (s eventTypeNamespaceLister) Get(name string) (*v1beta2.EventType, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta2.Resource("eventtype"), name) - } - return obj.(*v1beta2.EventType), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/expansion_generated.go deleted file mode 100644 index 4363c0140..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta2/expansion_generated.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta2 - -// EventTypeListerExpansion allows custom methods to be added to -// EventTypeLister. -type EventTypeListerExpansion interface{} - -// EventTypeNamespaceListerExpansion allows custom methods to be added to -// EventTypeNamespaceLister. -type EventTypeNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/eventtype.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/eventtype.go deleted file mode 100644 index 76d1efb30..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/eventtype.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta3 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1beta3 "knative.dev/eventing/pkg/apis/eventing/v1beta3" -) - -// EventTypeLister helps list EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeLister interface { - // List lists all EventTypes in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta3.EventType, err error) - // EventTypes returns an object that can list and get EventTypes. - EventTypes(namespace string) EventTypeNamespaceLister - EventTypeListerExpansion -} - -// eventTypeLister implements the EventTypeLister interface. -type eventTypeLister struct { - indexer cache.Indexer -} - -// NewEventTypeLister returns a new EventTypeLister. -func NewEventTypeLister(indexer cache.Indexer) EventTypeLister { - return &eventTypeLister{indexer: indexer} -} - -// List lists all EventTypes in the indexer. -func (s *eventTypeLister) List(selector labels.Selector) (ret []*v1beta3.EventType, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta3.EventType)) - }) - return ret, err -} - -// EventTypes returns an object that can list and get EventTypes. -func (s *eventTypeLister) EventTypes(namespace string) EventTypeNamespaceLister { - return eventTypeNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// EventTypeNamespaceLister helps list and get EventTypes. -// All objects returned here must be treated as read-only. -type EventTypeNamespaceLister interface { - // List lists all EventTypes in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta3.EventType, err error) - // Get retrieves the EventType from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1beta3.EventType, error) - EventTypeNamespaceListerExpansion -} - -// eventTypeNamespaceLister implements the EventTypeNamespaceLister -// interface. -type eventTypeNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all EventTypes in the indexer for a given namespace. -func (s eventTypeNamespaceLister) List(selector labels.Selector) (ret []*v1beta3.EventType, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta3.EventType)) - }) - return ret, err -} - -// Get retrieves the EventType from the indexer for a given namespace and name. -func (s eventTypeNamespaceLister) Get(name string) (*v1beta3.EventType, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta3.Resource("eventtype"), name) - } - return obj.(*v1beta3.EventType), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/expansion_generated.go deleted file mode 100644 index 465a79ef9..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/eventing/v1beta3/expansion_generated.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta3 - -// EventTypeListerExpansion allows custom methods to be added to -// EventTypeLister. -type EventTypeListerExpansion interface{} - -// EventTypeNamespaceListerExpansion allows custom methods to be added to -// EventTypeNamespaceLister. -type EventTypeNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/expansion_generated.go deleted file mode 100644 index 3bbe4519a..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/expansion_generated.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// ParallelListerExpansion allows custom methods to be added to -// ParallelLister. -type ParallelListerExpansion interface{} - -// ParallelNamespaceListerExpansion allows custom methods to be added to -// ParallelNamespaceLister. -type ParallelNamespaceListerExpansion interface{} - -// SequenceListerExpansion allows custom methods to be added to -// SequenceLister. -type SequenceListerExpansion interface{} - -// SequenceNamespaceListerExpansion allows custom methods to be added to -// SequenceNamespaceLister. -type SequenceNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/parallel.go b/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/parallel.go deleted file mode 100644 index 8ef7f1af9..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/parallel.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/flows/v1" -) - -// ParallelLister helps list Parallels. -// All objects returned here must be treated as read-only. -type ParallelLister interface { - // List lists all Parallels in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Parallel, err error) - // Parallels returns an object that can list and get Parallels. - Parallels(namespace string) ParallelNamespaceLister - ParallelListerExpansion -} - -// parallelLister implements the ParallelLister interface. -type parallelLister struct { - indexer cache.Indexer -} - -// NewParallelLister returns a new ParallelLister. -func NewParallelLister(indexer cache.Indexer) ParallelLister { - return ¶llelLister{indexer: indexer} -} - -// List lists all Parallels in the indexer. -func (s *parallelLister) List(selector labels.Selector) (ret []*v1.Parallel, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Parallel)) - }) - return ret, err -} - -// Parallels returns an object that can list and get Parallels. -func (s *parallelLister) Parallels(namespace string) ParallelNamespaceLister { - return parallelNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ParallelNamespaceLister helps list and get Parallels. -// All objects returned here must be treated as read-only. -type ParallelNamespaceLister interface { - // List lists all Parallels in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Parallel, err error) - // Get retrieves the Parallel from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Parallel, error) - ParallelNamespaceListerExpansion -} - -// parallelNamespaceLister implements the ParallelNamespaceLister -// interface. -type parallelNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Parallels in the indexer for a given namespace. -func (s parallelNamespaceLister) List(selector labels.Selector) (ret []*v1.Parallel, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Parallel)) - }) - return ret, err -} - -// Get retrieves the Parallel from the indexer for a given namespace and name. -func (s parallelNamespaceLister) Get(name string) (*v1.Parallel, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("parallel"), name) - } - return obj.(*v1.Parallel), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/sequence.go b/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/sequence.go deleted file mode 100644 index 9645a7f13..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/flows/v1/sequence.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/flows/v1" -) - -// SequenceLister helps list Sequences. -// All objects returned here must be treated as read-only. -type SequenceLister interface { - // List lists all Sequences in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Sequence, err error) - // Sequences returns an object that can list and get Sequences. - Sequences(namespace string) SequenceNamespaceLister - SequenceListerExpansion -} - -// sequenceLister implements the SequenceLister interface. -type sequenceLister struct { - indexer cache.Indexer -} - -// NewSequenceLister returns a new SequenceLister. -func NewSequenceLister(indexer cache.Indexer) SequenceLister { - return &sequenceLister{indexer: indexer} -} - -// List lists all Sequences in the indexer. -func (s *sequenceLister) List(selector labels.Selector) (ret []*v1.Sequence, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Sequence)) - }) - return ret, err -} - -// Sequences returns an object that can list and get Sequences. -func (s *sequenceLister) Sequences(namespace string) SequenceNamespaceLister { - return sequenceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// SequenceNamespaceLister helps list and get Sequences. -// All objects returned here must be treated as read-only. -type SequenceNamespaceLister interface { - // List lists all Sequences in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Sequence, err error) - // Get retrieves the Sequence from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Sequence, error) - SequenceNamespaceListerExpansion -} - -// sequenceNamespaceLister implements the SequenceNamespaceLister -// interface. -type sequenceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Sequences in the indexer for a given namespace. -func (s sequenceNamespaceLister) List(selector labels.Selector) (ret []*v1.Sequence, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Sequence)) - }) - return ret, err -} - -// Get retrieves the Sequence from the indexer for a given namespace and name. -func (s sequenceNamespaceLister) Get(name string) (*v1.Sequence, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("sequence"), name) - } - return obj.(*v1.Sequence), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/channel.go b/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/channel.go deleted file mode 100644 index 541b1bb75..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/channel.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/messaging/v1" -) - -// ChannelLister helps list Channels. -// All objects returned here must be treated as read-only. -type ChannelLister interface { - // List lists all Channels in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Channel, err error) - // Channels returns an object that can list and get Channels. - Channels(namespace string) ChannelNamespaceLister - ChannelListerExpansion -} - -// channelLister implements the ChannelLister interface. -type channelLister struct { - indexer cache.Indexer -} - -// NewChannelLister returns a new ChannelLister. -func NewChannelLister(indexer cache.Indexer) ChannelLister { - return &channelLister{indexer: indexer} -} - -// List lists all Channels in the indexer. -func (s *channelLister) List(selector labels.Selector) (ret []*v1.Channel, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Channel)) - }) - return ret, err -} - -// Channels returns an object that can list and get Channels. -func (s *channelLister) Channels(namespace string) ChannelNamespaceLister { - return channelNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ChannelNamespaceLister helps list and get Channels. -// All objects returned here must be treated as read-only. -type ChannelNamespaceLister interface { - // List lists all Channels in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Channel, err error) - // Get retrieves the Channel from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Channel, error) - ChannelNamespaceListerExpansion -} - -// channelNamespaceLister implements the ChannelNamespaceLister -// interface. -type channelNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Channels in the indexer for a given namespace. -func (s channelNamespaceLister) List(selector labels.Selector) (ret []*v1.Channel, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Channel)) - }) - return ret, err -} - -// Get retrieves the Channel from the indexer for a given namespace and name. -func (s channelNamespaceLister) Get(name string) (*v1.Channel, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("channel"), name) - } - return obj.(*v1.Channel), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/expansion_generated.go deleted file mode 100644 index 26d579bde..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/expansion_generated.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// ChannelListerExpansion allows custom methods to be added to -// ChannelLister. -type ChannelListerExpansion interface{} - -// ChannelNamespaceListerExpansion allows custom methods to be added to -// ChannelNamespaceLister. -type ChannelNamespaceListerExpansion interface{} - -// InMemoryChannelListerExpansion allows custom methods to be added to -// InMemoryChannelLister. -type InMemoryChannelListerExpansion interface{} - -// InMemoryChannelNamespaceListerExpansion allows custom methods to be added to -// InMemoryChannelNamespaceLister. -type InMemoryChannelNamespaceListerExpansion interface{} - -// SubscriptionListerExpansion allows custom methods to be added to -// SubscriptionLister. -type SubscriptionListerExpansion interface{} - -// SubscriptionNamespaceListerExpansion allows custom methods to be added to -// SubscriptionNamespaceLister. -type SubscriptionNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/inmemorychannel.go b/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/inmemorychannel.go deleted file mode 100644 index e6b86840c..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/inmemorychannel.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/messaging/v1" -) - -// InMemoryChannelLister helps list InMemoryChannels. -// All objects returned here must be treated as read-only. -type InMemoryChannelLister interface { - // List lists all InMemoryChannels in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.InMemoryChannel, err error) - // InMemoryChannels returns an object that can list and get InMemoryChannels. - InMemoryChannels(namespace string) InMemoryChannelNamespaceLister - InMemoryChannelListerExpansion -} - -// inMemoryChannelLister implements the InMemoryChannelLister interface. -type inMemoryChannelLister struct { - indexer cache.Indexer -} - -// NewInMemoryChannelLister returns a new InMemoryChannelLister. -func NewInMemoryChannelLister(indexer cache.Indexer) InMemoryChannelLister { - return &inMemoryChannelLister{indexer: indexer} -} - -// List lists all InMemoryChannels in the indexer. -func (s *inMemoryChannelLister) List(selector labels.Selector) (ret []*v1.InMemoryChannel, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.InMemoryChannel)) - }) - return ret, err -} - -// InMemoryChannels returns an object that can list and get InMemoryChannels. -func (s *inMemoryChannelLister) InMemoryChannels(namespace string) InMemoryChannelNamespaceLister { - return inMemoryChannelNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// InMemoryChannelNamespaceLister helps list and get InMemoryChannels. -// All objects returned here must be treated as read-only. -type InMemoryChannelNamespaceLister interface { - // List lists all InMemoryChannels in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.InMemoryChannel, err error) - // Get retrieves the InMemoryChannel from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.InMemoryChannel, error) - InMemoryChannelNamespaceListerExpansion -} - -// inMemoryChannelNamespaceLister implements the InMemoryChannelNamespaceLister -// interface. -type inMemoryChannelNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all InMemoryChannels in the indexer for a given namespace. -func (s inMemoryChannelNamespaceLister) List(selector labels.Selector) (ret []*v1.InMemoryChannel, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.InMemoryChannel)) - }) - return ret, err -} - -// Get retrieves the InMemoryChannel from the indexer for a given namespace and name. -func (s inMemoryChannelNamespaceLister) Get(name string) (*v1.InMemoryChannel, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("inmemorychannel"), name) - } - return obj.(*v1.InMemoryChannel), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/subscription.go b/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/subscription.go deleted file mode 100644 index d50d620db..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/messaging/v1/subscription.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/messaging/v1" -) - -// SubscriptionLister helps list Subscriptions. -// All objects returned here must be treated as read-only. -type SubscriptionLister interface { - // List lists all Subscriptions in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Subscription, err error) - // Subscriptions returns an object that can list and get Subscriptions. - Subscriptions(namespace string) SubscriptionNamespaceLister - SubscriptionListerExpansion -} - -// subscriptionLister implements the SubscriptionLister interface. -type subscriptionLister struct { - indexer cache.Indexer -} - -// NewSubscriptionLister returns a new SubscriptionLister. -func NewSubscriptionLister(indexer cache.Indexer) SubscriptionLister { - return &subscriptionLister{indexer: indexer} -} - -// List lists all Subscriptions in the indexer. -func (s *subscriptionLister) List(selector labels.Selector) (ret []*v1.Subscription, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Subscription)) - }) - return ret, err -} - -// Subscriptions returns an object that can list and get Subscriptions. -func (s *subscriptionLister) Subscriptions(namespace string) SubscriptionNamespaceLister { - return subscriptionNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// SubscriptionNamespaceLister helps list and get Subscriptions. -// All objects returned here must be treated as read-only. -type SubscriptionNamespaceLister interface { - // List lists all Subscriptions in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Subscription, err error) - // Get retrieves the Subscription from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.Subscription, error) - SubscriptionNamespaceListerExpansion -} - -// subscriptionNamespaceLister implements the SubscriptionNamespaceLister -// interface. -type subscriptionNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all Subscriptions in the indexer for a given namespace. -func (s subscriptionNamespaceLister) List(selector labels.Selector) (ret []*v1.Subscription, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Subscription)) - }) - return ret, err -} - -// Get retrieves the Subscription from the indexer for a given namespace and name. -func (s subscriptionNamespaceLister) Get(name string) (*v1.Subscription, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("subscription"), name) - } - return obj.(*v1.Subscription), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/expansion_generated.go deleted file mode 100644 index 48dbd0326..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// JobSinkListerExpansion allows custom methods to be added to -// JobSinkLister. -type JobSinkListerExpansion interface{} - -// JobSinkNamespaceListerExpansion allows custom methods to be added to -// JobSinkNamespaceLister. -type JobSinkNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/jobsink.go b/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/jobsink.go deleted file mode 100644 index 4dcd9c82c..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sinks/v1alpha1/jobsink.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1alpha1 "knative.dev/eventing/pkg/apis/sinks/v1alpha1" -) - -// JobSinkLister helps list JobSinks. -// All objects returned here must be treated as read-only. -type JobSinkLister interface { - // List lists all JobSinks in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobSink, err error) - // JobSinks returns an object that can list and get JobSinks. - JobSinks(namespace string) JobSinkNamespaceLister - JobSinkListerExpansion -} - -// jobSinkLister implements the JobSinkLister interface. -type jobSinkLister struct { - indexer cache.Indexer -} - -// NewJobSinkLister returns a new JobSinkLister. -func NewJobSinkLister(indexer cache.Indexer) JobSinkLister { - return &jobSinkLister{indexer: indexer} -} - -// List lists all JobSinks in the indexer. -func (s *jobSinkLister) List(selector labels.Selector) (ret []*v1alpha1.JobSink, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.JobSink)) - }) - return ret, err -} - -// JobSinks returns an object that can list and get JobSinks. -func (s *jobSinkLister) JobSinks(namespace string) JobSinkNamespaceLister { - return jobSinkNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// JobSinkNamespaceLister helps list and get JobSinks. -// All objects returned here must be treated as read-only. -type JobSinkNamespaceLister interface { - // List lists all JobSinks in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.JobSink, err error) - // Get retrieves the JobSink from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.JobSink, error) - JobSinkNamespaceListerExpansion -} - -// jobSinkNamespaceLister implements the JobSinkNamespaceLister -// interface. -type jobSinkNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all JobSinks in the indexer for a given namespace. -func (s jobSinkNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.JobSink, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.JobSink)) - }) - return ret, err -} - -// Get retrieves the JobSink from the indexer for a given namespace and name. -func (s jobSinkNamespaceLister) Get(name string) (*v1alpha1.JobSink, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("jobsink"), name) - } - return obj.(*v1alpha1.JobSink), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/apiserversource.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/apiserversource.go deleted file mode 100644 index 4c8fb52f1..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/apiserversource.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/sources/v1" -) - -// ApiServerSourceLister helps list ApiServerSources. -// All objects returned here must be treated as read-only. -type ApiServerSourceLister interface { - // List lists all ApiServerSources in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ApiServerSource, err error) - // ApiServerSources returns an object that can list and get ApiServerSources. - ApiServerSources(namespace string) ApiServerSourceNamespaceLister - ApiServerSourceListerExpansion -} - -// apiServerSourceLister implements the ApiServerSourceLister interface. -type apiServerSourceLister struct { - indexer cache.Indexer -} - -// NewApiServerSourceLister returns a new ApiServerSourceLister. -func NewApiServerSourceLister(indexer cache.Indexer) ApiServerSourceLister { - return &apiServerSourceLister{indexer: indexer} -} - -// List lists all ApiServerSources in the indexer. -func (s *apiServerSourceLister) List(selector labels.Selector) (ret []*v1.ApiServerSource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ApiServerSource)) - }) - return ret, err -} - -// ApiServerSources returns an object that can list and get ApiServerSources. -func (s *apiServerSourceLister) ApiServerSources(namespace string) ApiServerSourceNamespaceLister { - return apiServerSourceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ApiServerSourceNamespaceLister helps list and get ApiServerSources. -// All objects returned here must be treated as read-only. -type ApiServerSourceNamespaceLister interface { - // List lists all ApiServerSources in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ApiServerSource, err error) - // Get retrieves the ApiServerSource from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.ApiServerSource, error) - ApiServerSourceNamespaceListerExpansion -} - -// apiServerSourceNamespaceLister implements the ApiServerSourceNamespaceLister -// interface. -type apiServerSourceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ApiServerSources in the indexer for a given namespace. -func (s apiServerSourceNamespaceLister) List(selector labels.Selector) (ret []*v1.ApiServerSource, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ApiServerSource)) - }) - return ret, err -} - -// Get retrieves the ApiServerSource from the indexer for a given namespace and name. -func (s apiServerSourceNamespaceLister) Get(name string) (*v1.ApiServerSource, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("apiserversource"), name) - } - return obj.(*v1.ApiServerSource), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/containersource.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/containersource.go deleted file mode 100644 index 12d1e51cd..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/containersource.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/sources/v1" -) - -// ContainerSourceLister helps list ContainerSources. -// All objects returned here must be treated as read-only. -type ContainerSourceLister interface { - // List lists all ContainerSources in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ContainerSource, err error) - // ContainerSources returns an object that can list and get ContainerSources. - ContainerSources(namespace string) ContainerSourceNamespaceLister - ContainerSourceListerExpansion -} - -// containerSourceLister implements the ContainerSourceLister interface. -type containerSourceLister struct { - indexer cache.Indexer -} - -// NewContainerSourceLister returns a new ContainerSourceLister. -func NewContainerSourceLister(indexer cache.Indexer) ContainerSourceLister { - return &containerSourceLister{indexer: indexer} -} - -// List lists all ContainerSources in the indexer. -func (s *containerSourceLister) List(selector labels.Selector) (ret []*v1.ContainerSource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ContainerSource)) - }) - return ret, err -} - -// ContainerSources returns an object that can list and get ContainerSources. -func (s *containerSourceLister) ContainerSources(namespace string) ContainerSourceNamespaceLister { - return containerSourceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ContainerSourceNamespaceLister helps list and get ContainerSources. -// All objects returned here must be treated as read-only. -type ContainerSourceNamespaceLister interface { - // List lists all ContainerSources in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ContainerSource, err error) - // Get retrieves the ContainerSource from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.ContainerSource, error) - ContainerSourceNamespaceListerExpansion -} - -// containerSourceNamespaceLister implements the ContainerSourceNamespaceLister -// interface. -type containerSourceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ContainerSources in the indexer for a given namespace. -func (s containerSourceNamespaceLister) List(selector labels.Selector) (ret []*v1.ContainerSource, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ContainerSource)) - }) - return ret, err -} - -// Get retrieves the ContainerSource from the indexer for a given namespace and name. -func (s containerSourceNamespaceLister) Get(name string) (*v1.ContainerSource, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("containersource"), name) - } - return obj.(*v1.ContainerSource), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/expansion_generated.go deleted file mode 100644 index 7bc0e2952..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/expansion_generated.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// ApiServerSourceListerExpansion allows custom methods to be added to -// ApiServerSourceLister. -type ApiServerSourceListerExpansion interface{} - -// ApiServerSourceNamespaceListerExpansion allows custom methods to be added to -// ApiServerSourceNamespaceLister. -type ApiServerSourceNamespaceListerExpansion interface{} - -// ContainerSourceListerExpansion allows custom methods to be added to -// ContainerSourceLister. -type ContainerSourceListerExpansion interface{} - -// ContainerSourceNamespaceListerExpansion allows custom methods to be added to -// ContainerSourceNamespaceLister. -type ContainerSourceNamespaceListerExpansion interface{} - -// PingSourceListerExpansion allows custom methods to be added to -// PingSourceLister. -type PingSourceListerExpansion interface{} - -// PingSourceNamespaceListerExpansion allows custom methods to be added to -// PingSourceNamespaceLister. -type PingSourceNamespaceListerExpansion interface{} - -// SinkBindingListerExpansion allows custom methods to be added to -// SinkBindingLister. -type SinkBindingListerExpansion interface{} - -// SinkBindingNamespaceListerExpansion allows custom methods to be added to -// SinkBindingNamespaceLister. -type SinkBindingNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/pingsource.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/pingsource.go deleted file mode 100644 index 54918c9d5..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/pingsource.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/sources/v1" -) - -// PingSourceLister helps list PingSources. -// All objects returned here must be treated as read-only. -type PingSourceLister interface { - // List lists all PingSources in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.PingSource, err error) - // PingSources returns an object that can list and get PingSources. - PingSources(namespace string) PingSourceNamespaceLister - PingSourceListerExpansion -} - -// pingSourceLister implements the PingSourceLister interface. -type pingSourceLister struct { - indexer cache.Indexer -} - -// NewPingSourceLister returns a new PingSourceLister. -func NewPingSourceLister(indexer cache.Indexer) PingSourceLister { - return &pingSourceLister{indexer: indexer} -} - -// List lists all PingSources in the indexer. -func (s *pingSourceLister) List(selector labels.Selector) (ret []*v1.PingSource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PingSource)) - }) - return ret, err -} - -// PingSources returns an object that can list and get PingSources. -func (s *pingSourceLister) PingSources(namespace string) PingSourceNamespaceLister { - return pingSourceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// PingSourceNamespaceLister helps list and get PingSources. -// All objects returned here must be treated as read-only. -type PingSourceNamespaceLister interface { - // List lists all PingSources in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.PingSource, err error) - // Get retrieves the PingSource from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.PingSource, error) - PingSourceNamespaceListerExpansion -} - -// pingSourceNamespaceLister implements the PingSourceNamespaceLister -// interface. -type pingSourceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all PingSources in the indexer for a given namespace. -func (s pingSourceNamespaceLister) List(selector labels.Selector) (ret []*v1.PingSource, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PingSource)) - }) - return ret, err -} - -// Get retrieves the PingSource from the indexer for a given namespace and name. -func (s pingSourceNamespaceLister) Get(name string) (*v1.PingSource, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("pingsource"), name) - } - return obj.(*v1.PingSource), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/sinkbinding.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/sinkbinding.go deleted file mode 100644 index e0441b874..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1/sinkbinding.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1 "knative.dev/eventing/pkg/apis/sources/v1" -) - -// SinkBindingLister helps list SinkBindings. -// All objects returned here must be treated as read-only. -type SinkBindingLister interface { - // List lists all SinkBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.SinkBinding, err error) - // SinkBindings returns an object that can list and get SinkBindings. - SinkBindings(namespace string) SinkBindingNamespaceLister - SinkBindingListerExpansion -} - -// sinkBindingLister implements the SinkBindingLister interface. -type sinkBindingLister struct { - indexer cache.Indexer -} - -// NewSinkBindingLister returns a new SinkBindingLister. -func NewSinkBindingLister(indexer cache.Indexer) SinkBindingLister { - return &sinkBindingLister{indexer: indexer} -} - -// List lists all SinkBindings in the indexer. -func (s *sinkBindingLister) List(selector labels.Selector) (ret []*v1.SinkBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SinkBinding)) - }) - return ret, err -} - -// SinkBindings returns an object that can list and get SinkBindings. -func (s *sinkBindingLister) SinkBindings(namespace string) SinkBindingNamespaceLister { - return sinkBindingNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// SinkBindingNamespaceLister helps list and get SinkBindings. -// All objects returned here must be treated as read-only. -type SinkBindingNamespaceLister interface { - // List lists all SinkBindings in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.SinkBinding, err error) - // Get retrieves the SinkBinding from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.SinkBinding, error) - SinkBindingNamespaceListerExpansion -} - -// sinkBindingNamespaceLister implements the SinkBindingNamespaceLister -// interface. -type sinkBindingNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all SinkBindings in the indexer for a given namespace. -func (s sinkBindingNamespaceLister) List(selector labels.Selector) (ret []*v1.SinkBinding, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.SinkBinding)) - }) - return ret, err -} - -// Get retrieves the SinkBinding from the indexer for a given namespace and name. -func (s sinkBindingNamespaceLister) Get(name string) (*v1.SinkBinding, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("sinkbinding"), name) - } - return obj.(*v1.SinkBinding), nil -} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/expansion_generated.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/expansion_generated.go deleted file mode 100644 index 83a507e82..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/expansion_generated.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta2 - -// PingSourceListerExpansion allows custom methods to be added to -// PingSourceLister. -type PingSourceListerExpansion interface{} - -// PingSourceNamespaceListerExpansion allows custom methods to be added to -// PingSourceNamespaceLister. -type PingSourceNamespaceListerExpansion interface{} diff --git a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/pingsource.go b/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/pingsource.go deleted file mode 100644 index 14c549b23..000000000 --- a/vendor/knative.dev/eventing/pkg/client/listers/sources/v1beta2/pingsource.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 The Knative Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - v1beta2 "knative.dev/eventing/pkg/apis/sources/v1beta2" -) - -// PingSourceLister helps list PingSources. -// All objects returned here must be treated as read-only. -type PingSourceLister interface { - // List lists all PingSources in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta2.PingSource, err error) - // PingSources returns an object that can list and get PingSources. - PingSources(namespace string) PingSourceNamespaceLister - PingSourceListerExpansion -} - -// pingSourceLister implements the PingSourceLister interface. -type pingSourceLister struct { - indexer cache.Indexer -} - -// NewPingSourceLister returns a new PingSourceLister. -func NewPingSourceLister(indexer cache.Indexer) PingSourceLister { - return &pingSourceLister{indexer: indexer} -} - -// List lists all PingSources in the indexer. -func (s *pingSourceLister) List(selector labels.Selector) (ret []*v1beta2.PingSource, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta2.PingSource)) - }) - return ret, err -} - -// PingSources returns an object that can list and get PingSources. -func (s *pingSourceLister) PingSources(namespace string) PingSourceNamespaceLister { - return pingSourceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// PingSourceNamespaceLister helps list and get PingSources. -// All objects returned here must be treated as read-only. -type PingSourceNamespaceLister interface { - // List lists all PingSources in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta2.PingSource, err error) - // Get retrieves the PingSource from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1beta2.PingSource, error) - PingSourceNamespaceListerExpansion -} - -// pingSourceNamespaceLister implements the PingSourceNamespaceLister -// interface. -type pingSourceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all PingSources in the indexer for a given namespace. -func (s pingSourceNamespaceLister) List(selector labels.Selector) (ret []*v1beta2.PingSource, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta2.PingSource)) - }) - return ret, err -} - -// Get retrieves the PingSource from the indexer for a given namespace and name. -func (s pingSourceNamespaceLister) Get(name string) (*v1beta2.PingSource, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta2.Resource("pingsource"), name) - } - return obj.(*v1beta2.PingSource), nil -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4ec34a99a..c6f771645 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -295,8 +295,8 @@ golang.org/x/crypto/openpgp/errors golang.org/x/crypto/openpgp/packet golang.org/x/crypto/openpgp/s2k golang.org/x/crypto/pbkdf2 -# golang.org/x/mod v0.20.0 -## explicit; go 1.18 +# golang.org/x/mod v0.21.0 +## explicit; go 1.22.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver @@ -334,8 +334,8 @@ golang.org/x/text/unicode/norm # golang.org/x/time v0.6.0 ## explicit; go 1.18 golang.org/x/time/rate -# golang.org/x/tools v0.24.0 -## explicit; go 1.19 +# golang.org/x/tools v0.25.0 +## explicit; go 1.22.0 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/gcexportdata golang.org/x/tools/go/packages @@ -368,7 +368,7 @@ google.golang.org/genproto/googleapis/api/httpbody # google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.66.0 +# google.golang.org/grpc v1.66.2 ## explicit; go 1.21 google.golang.org/grpc google.golang.org/grpc/attributes @@ -990,7 +990,7 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d +# knative.dev/eventing v0.42.1-0.20240917082247-e79f3b65893a ## explicit; go 1.22.0 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -1041,37 +1041,9 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake -knative.dev/eventing/pkg/client/informers/externalversions -knative.dev/eventing/pkg/client/informers/externalversions/eventing -knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1 -knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1alpha1 -knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta1 -knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta2 -knative.dev/eventing/pkg/client/informers/externalversions/eventing/v1beta3 -knative.dev/eventing/pkg/client/informers/externalversions/flows -knative.dev/eventing/pkg/client/informers/externalversions/flows/v1 -knative.dev/eventing/pkg/client/informers/externalversions/internalinterfaces -knative.dev/eventing/pkg/client/informers/externalversions/messaging -knative.dev/eventing/pkg/client/informers/externalversions/messaging/v1 -knative.dev/eventing/pkg/client/informers/externalversions/sinks -knative.dev/eventing/pkg/client/informers/externalversions/sinks/v1alpha1 -knative.dev/eventing/pkg/client/informers/externalversions/sources -knative.dev/eventing/pkg/client/informers/externalversions/sources/v1 -knative.dev/eventing/pkg/client/informers/externalversions/sources/v1beta2 knative.dev/eventing/pkg/client/injection/client knative.dev/eventing/pkg/client/injection/client/fake -knative.dev/eventing/pkg/client/injection/informers/eventing/v1alpha1/eventpolicy -knative.dev/eventing/pkg/client/injection/informers/factory -knative.dev/eventing/pkg/client/listers/eventing/v1 knative.dev/eventing/pkg/client/listers/eventing/v1alpha1 -knative.dev/eventing/pkg/client/listers/eventing/v1beta1 -knative.dev/eventing/pkg/client/listers/eventing/v1beta2 -knative.dev/eventing/pkg/client/listers/eventing/v1beta3 -knative.dev/eventing/pkg/client/listers/flows/v1 -knative.dev/eventing/pkg/client/listers/messaging/v1 -knative.dev/eventing/pkg/client/listers/sinks/v1alpha1 -knative.dev/eventing/pkg/client/listers/sources/v1 -knative.dev/eventing/pkg/client/listers/sources/v1beta2 knative.dev/eventing/pkg/crossnamespace knative.dev/eventing/pkg/eventfilter knative.dev/eventing/pkg/eventfilter/attributes @@ -1084,12 +1056,12 @@ knative.dev/eventing/pkg/observability/client # knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d ## explicit; go 1.21 knative.dev/hack -# knative.dev/networking v0.0.0-20240909015032-433920a35ef4 +# knative.dev/networking v0.0.0-20240916143514-6c832c6e62a9 ## explicit; go 1.22.0 knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 knative.dev/networking/pkg/config -# knative.dev/pkg v0.0.0-20240912132815-3002873b449c +# knative.dev/pkg v0.0.0-20240917091217-aaab500c26c4 ## explicit; go 1.22.0 knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1154,7 +1126,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.42.1-0.20240913121933-63b0f86a6e5f +# knative.dev/serving v0.42.1-0.20240917162847-158a5c26b7fd ## explicit; go 1.22.0 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1