You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
445 B
20 lines
445 B
package api |
|
|
|
import ( |
|
"context" |
|
"fmt" |
|
|
|
"go-common/library/net/rpc/warden" |
|
|
|
"google.golang.org/grpc" |
|
) |
|
|
|
// AppID . |
|
const AppID = "community.service.favorite" |
|
|
|
// New fav service client |
|
func New(c *warden.ClientConfig, opts ...grpc.DialOption) (FavoriteClient, error) { |
|
client := warden.NewClient(c, opts...) |
|
conn, err := client.Dial(context.Background(), fmt.Sprintf("discovery://default/%s", AppID)) |
|
return NewFavoriteClient(conn), err |
|
}
|
|
|