-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
It this supported? For example:
// Package main implements a test JSON-RPC cli client
package main
import (
"context"
"flag"
"fmt"
"net"
"net/http"
"github.com/filecoin-project/go-jsonrpc"
"go.mills.io/saltyim"
)
func main() {
flag.Parse()
httpc := &http.Client{
Transport: &http.Transport{
DialContext: func(_ context.Context, _, _ string) (net.Conn, error) {
return net.Dial("unix", flag.Arg(0))
},
},
}
var cli struct {
Me func() saltyim.Addr
String func() string
}
closer, err := jsonrpc.NewMergeClient(
context.Background(),
"http://example.com",
"Client",
[]any{&cli},
nil,
jsonrpc.WithHTTPClient(httpc),
)
if err != nil {
panic(err)
}
defer closer()
fmt.Printf("String():\n%s\n", cli.String())
me := cli.Me()
fmt.Printf("Me(): #%v\n", me)
}Currently I get nil for a call to cli.me() 🤔
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed