solidarity transport updates
This commit is contained in:
23
services/solidaritytransport.go
Normal file
23
services/solidaritytransport.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"git.coopgo.io/coopgo-platform/solidarity-transport/servers/grpc/proto/gen"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type SolidarityTransportService struct {
|
||||
gen.SolidarityTransportClient
|
||||
}
|
||||
|
||||
func NewSolidarityTransportService(dial string) (*SolidarityTransportService, error) {
|
||||
conn, err := grpc.Dial(dial, grpc.WithInsecure())
|
||||
|
||||
client := gen.NewSolidarityTransportClient(conn)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &SolidarityTransportService{
|
||||
SolidarityTransportClient: client,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user