Skip to content
Snippets Groups Projects
sbi.go 472 B
Newer Older
  • Learn to ignore specific revisions
  • 	spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound"
    
    	"google.golang.org/grpc"
    )
    
    // SbiClient returns a client for the gRPC SBI service. It takes
    // the address of the gRPC endpoint and optional grpc.DialOption
    
    func SbiClient(addr string, opts ...grpc.DialOption) (spb.SbiServiceClient, error) {
    
    	conn, err := grpc.NewClient(addr, opts...)
    
    	if err != nil {
    		return nil, err
    	}
    	return spb.NewSbiServiceClient(conn), nil
    }