github.com/polarismesh/polaris@v1.17.8/service/api.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 service
    19  
    20  import (
    21  	"github.com/polarismesh/polaris/cache"
    22  	"github.com/polarismesh/polaris/common/model"
    23  )
    24  
    25  // DiscoverServer Server discovered by the service
    26  type DiscoverServer interface {
    27  	// DiscoverServerV1 DiscoverServerV1
    28  	DiscoverServerV1
    29  	// ServiceAliasOperateServer Service alias operation interface definition
    30  	ServiceAliasOperateServer
    31  	// ServiceOperateServer Service operation interface definition
    32  	ServiceOperateServer
    33  	// InstanceOperateServer Instance Operation Interface Definition
    34  	InstanceOperateServer
    35  	// ClientServer Client operation interface definition
    36  	ClientServer
    37  	// Cache Get cache management
    38  	Cache() *cache.CacheManager
    39  	// L5OperateServer L5 related operations
    40  	L5OperateServer
    41  	// GetServiceInstanceRevision Get the version of the service
    42  	GetServiceInstanceRevision(serviceID string, instances []*model.Instance) (string, error)
    43  }