Skip to content
Snippets Groups Projects
Commit c449b65f authored by LaurenceLiZhixin's avatar LaurenceLiZhixin
Browse files

fix: add liscense

parent cc295093
No related branches found
No related tags found
No related merge requests found
/*
* 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 config
import (
......@@ -21,16 +38,6 @@ type VirtualServiceConfig struct {
Spec UniformRouterConfigSpec `yaml:"spec" json:"spec"`
}
//func (vsc *VirtualServiceConfig) ChangeJsonTab2YamlTabAndGetYamlByte() ([]byte, error) {
// data, err := json.Marshal(vsc)
// if err != nil {
// logger.Error("marshal virtual service config err:", err)
// return []byte{}, err
// }
// yaml.Unmarshal(data, vsc)
//
//}
type UniformRouterConfigSpec struct {
Hosts []string `yaml:"hosts" json:"hosts"`
Dubbo []*DubboRoute `yaml:"dubbo" json:"dubbo"`
......@@ -153,31 +160,12 @@ func (urc *VirtualServiceConfig) DeepCopyObject() runtime.Object {
return out
}
//func (drc *DestinationRuleSpec) DeepCopyObject() runtime.Object {
// data, _ := yaml.Marshal(drc)
// out := &DestinationRuleSpec{}
// yaml.Unmarshal(data, out)
// return out
//}
type DestinationRuleSpecList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DestinationRuleSpec `json:"items"`
}
//func (urc *DestinationRuleSpecList) DeepCopyObject() runtime.Object {
// out := &DestinationRuleSpecList{
// TypeMeta: urc.TypeMeta,
// ListMeta: urc.ListMeta,
// }
// for _, v := range urc.Items {
// spec := v.DeepCopyObject().(*DestinationRuleSpec)
// out.Items = append(out.Items, *spec)
// }
// return out
//}
type VirtualServiceConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
......
/*
* 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 k8sCRD
import (
......
/*
* 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 k8sCRD
import (
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment