github.com/nacos-group/nacos-sdk-go@v1.1.4/clients/nacos_client/nacos_client_interface.go (about) 1 /* 2 * Copyright 1999-2020 Alibaba Group Holding Ltd. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package nacos_client 18 19 import ( 20 "github.com/nacos-group/nacos-sdk-go/common/constant" 21 "github.com/nacos-group/nacos-sdk-go/common/http_agent" 22 ) 23 24 //go:generate mockgen -destination mock_nacos_client_interface.go -package nacos_client -source=./nacos_client_interface.go 25 26 type INacosClient interface { 27 28 //SetClientConfig is use to set nacos client config 29 SetClientConfig(constant.ClientConfig) error 30 //SetServerConfig is use to set nacos server config 31 SetServerConfig([]constant.ServerConfig) error 32 //GetClientConfig use to get client config 33 GetClientConfig() (constant.ClientConfig, error) 34 //GetServerConfig use to get server config 35 GetServerConfig() ([]constant.ServerConfig, error) 36 //SetHttpAgent use to set http agent 37 SetHttpAgent(http_agent.IHttpAgent) error 38 //GetHttpAgent use to get http agent 39 GetHttpAgent() (http_agent.IHttpAgent, error) 40 }