github.com/polarismesh/polaris@v1.17.8/common/model/l5.go (about)

     1  /**
     2   * Tencent is pleased to support the open source community by making Polaris available.
     3   *
     4   * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
     5   *
     6   * Licensed under the BSD 3-Clause License (the "License");
     7   * you may not use this file except in compliance with the License.
     8   * You may obtain a copy of the License at
     9   *
    10   * https://opensource.org/licenses/BSD-3-Clause
    11   *
    12   * Unless required by applicable law or agreed to in writing, software distributed
    13   * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
    14   * CONDITIONS OF ANY KIND, either express or implied. See the License for the
    15   * specific language governing permissions and limitations under the License.
    16   */
    17  
    18  package model
    19  
    20  // Route 访问关系
    21  type Route struct {
    22  	IP    uint32
    23  	ModID uint32
    24  	CmdID uint32
    25  	SetID string
    26  	Valid bool
    27  	Flow  uint32
    28  }
    29  
    30  // Policy 有状态规则路由策略信息
    31  type Policy struct {
    32  	ModID uint32
    33  	Div   uint32
    34  	Mod   uint32
    35  	Valid bool
    36  	Flow  uint32
    37  }
    38  
    39  // Section 有状态规则路由分段信息
    40  type Section struct {
    41  	ModID uint32
    42  	From  uint32
    43  	To    uint32
    44  	Xid   uint32
    45  	Valid bool
    46  	Flow  uint32
    47  }
    48  
    49  // IPConfig IP的区域信息
    50  type IPConfig struct {
    51  	IP     uint32
    52  	AreaID uint32
    53  	CityID uint32
    54  	IdcID  uint32
    55  	Valid  bool
    56  	Flow   uint32
    57  }
    58  
    59  // Sid sid信息
    60  type Sid struct {
    61  	ModID uint32
    62  	CmdID uint32
    63  }
    64  
    65  // Callee 被调信息,对应t_server+t_ip_config
    66  type Callee struct {
    67  	ModID    uint32
    68  	CmdID    uint32
    69  	SetID    string
    70  	IP       uint32
    71  	Port     uint32
    72  	Weight   uint32
    73  	Location *Location
    74  	// AreaID uint32
    75  	// CityID uint32
    76  	// IdcID  uint32
    77  }
    78  
    79  // SidConfig sid信息,对应t_sid表
    80  type SidConfig struct {
    81  	ModID  uint32
    82  	CmdID  uint32
    83  	Name   string
    84  	Policy uint32
    85  }