Hi everyone! I'm trying to call gRPC over self-hos...
# ory-selfhosting
w
Hi everyone! I'm trying to call gRPC over self-hosted Ory Keto:
Copy code
package main

import (
    "context"
    "fmt"

    rts "<http://github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2|github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2>"
    "<http://google.golang.org/grpc|google.golang.org/grpc>"
    "<http://google.golang.org/grpc/credentials/insecure|google.golang.org/grpc/credentials/insecure>"
)

func main() {

    readUrl := "127.1.27.4:80" // kubefwd
    writeUrl := "127.1.27.3:80"
    conn, _ = grpc.Dial(writeUrl,
        grpc.WithTransportCredentials(insecure.NewCredentials()),
    )
    writeClient := rts.NewWriteServiceClient(conn)

    relationTupleDeltas := []*rts.RelationTupleDelta{}
    relationTupleDeltas = append(relationTupleDeltas, &rts.RelationTupleDelta{
        Action: rts.RelationTupleDelta_ACTION_INSERT,
        RelationTuple: &rts.RelationTuple{
            Namespace: "Person",
            Object:    "object1",
            Relation:  "view",
            Subject: rts.NewSubjectSet(
                "namespace2",
                "object2",
                "relation",
            ),
        },
    })
    res, err := writeClient.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{
        RelationTupleDeltas: relationTupleDeltas,
    })
}
But getting error:
msg=finished unary call with code Unknown audience=application error=The requested resource could not be found grpc.code=Unknown grpc.method=TransactRelationTuples grpc.service=ory.keto.relation_tuples.v1alpha2.WriteS
ervice grpc.start_time=2023-10-05T13:55:43Z grpc.time_ms=0.098 service_name=Ory Keto service_version=v0.11.1-alpha.0 span.kind=server system=grpc