api to rpc

This commit is contained in:
withchao
2023-02-27 14:44:14 +08:00
parent 03ccd0131a
commit 0411a5045b
9 changed files with 173 additions and 16 deletions
+2 -1
View File
@@ -526,7 +526,8 @@ func (c *config) initConfig(config interface{}, configName, configPath string) e
}
func (c *config) Register(registry discoveryregistry.SvcDiscoveryRegistry) error {
registry
//registry
return nil
}
func InitConfig() error {
+1 -1
View File
@@ -9,5 +9,5 @@ type SvcDiscoveryRegistry interface {
UnRegister() error
GetConns(serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
GetConn(serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Re
//Re
}
+1 -1
View File
@@ -39,7 +39,7 @@ func TestSliceToMap(t *testing.T) {
func TestIndexOf(t *testing.T) {
arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
fmt.Println(IndexOf(arr, 3))
fmt.Println(IndexOf(3, arr...))
}