Skip to content
Snippets Groups Projects
pnd.go 439 B
Newer Older
  • Learn to ignore specific revisions
  • Manuel Kieweg's avatar
    Manuel Kieweg committed
    package client
    
    import (
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	ppb "code.fbi.h-da.de/danet/api/go/gosdn/pnd"
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	"google.golang.org/grpc"
    )
    
    // PndClient returns a client for the gRPC PND service. It takes
    // the address of the gRPC endpoint and optional grpc.DialOption
    // as argument
    func PndClient(addr string, opts ...grpc.DialOption) (ppb.PndClient, error) {
    	conn, err := grpc.Dial(addr, opts...)
    	if err != nil {
    		return nil, err
    	}
    	return ppb.NewPndClient(conn), nil
    }