From daac5e123d84f64134808da08859664d4baf7fad Mon Sep 17 00:00:00 2001 From: "scott.wang" <scottwangsxll@gmail.com> Date: Mon, 13 Jan 2020 11:33:43 +0800 Subject: [PATCH] Add apache license --- registry/etcdv3/registry.go | 2 +- registry/kubernetes/listener.go | 17 +++++++++++++++++ registry/kubernetes/listener_test.go | 17 +++++++++++++++++ registry/kubernetes/registry.go | 19 ++++++++++++++++++- registry/kubernetes/registry_test.go | 17 +++++++++++++++++ remoting/kubernetes/client.go | 17 +++++++++++++++++ remoting/kubernetes/facade.go | 17 +++++++++++++++++ remoting/kubernetes/listener.go | 17 +++++++++++++++++ remoting/kubernetes/store.go | 17 +++++++++++++++++ remoting/kubernetes/store_test.go | 17 +++++++++++++++++ 10 files changed, 155 insertions(+), 2 deletions(-) diff --git a/registry/etcdv3/registry.go b/registry/etcdv3/registry.go index 64eca0dc3..68ad456ca 100644 --- a/registry/etcdv3/registry.go +++ b/registry/etcdv3/registry.go @@ -331,7 +331,7 @@ func (r *etcdV3Registry) subscribe(svc *common.URL) (registry.Listener, error) { // NOTICE: // double-check the listener // if r.listener already be assigned, discard the new value - if r.listener == nil{ + if r.listener == nil { r.listener = listener } r.listenerLock.Unlock() diff --git a/registry/kubernetes/listener.go b/registry/kubernetes/listener.go index c4c951d75..0a494a422 100644 --- a/registry/kubernetes/listener.go +++ b/registry/kubernetes/listener.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( diff --git a/registry/kubernetes/listener_test.go b/registry/kubernetes/listener_test.go index 276009a41..7a3ea6a95 100644 --- a/registry/kubernetes/listener_test.go +++ b/registry/kubernetes/listener_test.go @@ -1 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes diff --git a/registry/kubernetes/registry.go b/registry/kubernetes/registry.go index 6f05b107b..81701dea0 100644 --- a/registry/kubernetes/registry.go +++ b/registry/kubernetes/registry.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( @@ -300,7 +317,7 @@ func (r *kubernetesRegistry) subscribe(svc *common.URL) (registry.Listener, erro // NOTICE: // double-check the listener // if r.listener already be assigned, discard the new value - if r.listener == nil{ + if r.listener == nil { r.listener = listener } r.listenerLock.Unlock() diff --git a/registry/kubernetes/registry_test.go b/registry/kubernetes/registry_test.go index 276009a41..7a3ea6a95 100644 --- a/registry/kubernetes/registry_test.go +++ b/registry/kubernetes/registry_test.go @@ -1 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes diff --git a/remoting/kubernetes/client.go b/remoting/kubernetes/client.go index e2b0a6388..a81c85abd 100644 --- a/remoting/kubernetes/client.go +++ b/remoting/kubernetes/client.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( diff --git a/remoting/kubernetes/facade.go b/remoting/kubernetes/facade.go index 4a6415057..0ab689d51 100644 --- a/remoting/kubernetes/facade.go +++ b/remoting/kubernetes/facade.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( diff --git a/remoting/kubernetes/listener.go b/remoting/kubernetes/listener.go index 48e1cc160..5c23d7872 100644 --- a/remoting/kubernetes/listener.go +++ b/remoting/kubernetes/listener.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( diff --git a/remoting/kubernetes/store.go b/remoting/kubernetes/store.go index f58291d0e..d7f35ced6 100644 --- a/remoting/kubernetes/store.go +++ b/remoting/kubernetes/store.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( diff --git a/remoting/kubernetes/store_test.go b/remoting/kubernetes/store_test.go index 5cb844f37..e4acee4b3 100644 --- a/remoting/kubernetes/store_test.go +++ b/remoting/kubernetes/store_test.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + package kubernetes import ( -- GitLab