dubbo.apache.org/dubbo-go/v3@v3.1.1/config/testdata/router_config_virtual_service.yml (about)

     1  apiVersion: service.dubbo.apache.org/v1alpha1
     2  kind: VirtualService
     3  metadata:
     4    name: demo-route
     5  spec:
     6    hosts:
     7      - demo  #  统一定义为应用名
     8    dubbo:
     9      - service:
    10          - exact: com.taobao.hsf.demoService:1.0.0
    11          - exact: com.taobao.hsf.demoService:2.0.0
    12        routedetail:
    13          - name: sayHello-String-method-route
    14            match:
    15              - method:
    16                  name_match:
    17                    exact: "sayHello"
    18            #                  argp:
    19            #                    - string
    20            route:
    21              - destination:
    22                  host: demo
    23                  subset: v1
    24                fallback:
    25                  destination:
    26                    host: demo
    27                    subset: v2
    28                  fallback:
    29                    destination:
    30                      host: demo
    31                      subset: v3
    32  
    33          - name: sayHello-method-route
    34            match:
    35              - method:
    36                  name_match:
    37                    exact: "s-method"
    38            route:
    39              - destination:
    40                  host: demo
    41                  subset: v2
    42                fallback:
    43                  destination:
    44                    host: demo
    45                    subset: v3
    46          - name: some-method-route
    47            match:
    48              - method:
    49                  name_match:
    50                    exact: "some-method"
    51            route:
    52              - destination:
    53                  host: demo
    54                  subset: v4
    55  
    56  #        - name: interface-route
    57  #          route:
    58  #            - destination:
    59  #              host: demo
    60  #              subset: v3
    61          - name: final
    62            match:
    63              - method:
    64                  name_match:
    65                    exact: "GetUser"
    66  
    67            route:
    68              - destination:
    69                  host: demo
    70                  subset: v1
    71                fallback:
    72                  destination:
    73                    host: demo
    74                    subset: v2
    75                  fallback:
    76                    destination:
    77                      host: demo
    78                      subset: v3
    79              - destination:
    80                  host: demo
    81                  subset: v3
    82                fallback:
    83                  destination:
    84                    host: demo
    85                    subset: v2
    86                  fallback:
    87                    destination:
    88                      host: demo
    89                      subset: v1
    90      - service:
    91          - exact: com.taobao.hsf.demoService:1.0.0
    92          - exact: org.apache.dubbo.UserProvider
    93        routedetail:
    94          - name: sayHello-String-method-route
    95            match:
    96              - method:
    97                  name_match:
    98                    exact: "sayHello"
    99            #                  argp:
   100            #                    - string
   101            route:
   102              - destination:
   103                  host: demo
   104                  subset: v1
   105                fallback:
   106                  destination:
   107                    host: demo
   108                    subset: v2
   109                  fallback:
   110                    destination:
   111                      host: demo
   112                      subset: v3
   113  
   114          - name: sayHello-method-route
   115            match:
   116              - method:
   117                  name_match:
   118                    exact: "s-method"
   119            route:
   120              - destination:
   121                  host: demo
   122                  subset: v2
   123                fallback:
   124                  destination:
   125                    host: demo
   126                    subset: v3
   127          - name: some-method-route
   128            match:
   129              - method:
   130                  name_match:
   131                    exact: "some-method"
   132            route:
   133              - destination:
   134                  host: demo
   135                  subset: v4
   136  
   137          #        - name: interface-route
   138          #          route:
   139          #            - destination:
   140          #              host: demo
   141          #              subset: v3
   142          - name: final
   143            match:
   144              - method:
   145                  name_match:
   146                    exact: "GetUser"
   147  
   148            route:
   149              - destination:
   150                  host: demo
   151                  subset: v1
   152                fallback:
   153                  destination:
   154                    host: demo
   155                    subset: v2
   156                  fallback:
   157                    destination:
   158                      host: demo
   159                      subset: v3
   160              - destination:
   161                  host: demo
   162                  subset: v3
   163                fallback:
   164                  destination:
   165                    host: demo
   166                    subset: v2
   167                  fallback:
   168                    destination:
   169                      host: demo
   170                      subset: v1