client
v0.0.0-20260210234752-80bdd1704a23
gate.computer/grpc/client
Documentation
pkg.go.dev ↗Types
Conn
type Conn struct {
Services []*Service
// contains filtered or unexported fields
}
Conn is a connection to a gRPC server.
New
func New(ctx Context, conn *grpc.ClientConn) (*Conn, error)
New takes ownership of conn.
NewClient
func NewClient(ctx Context, target string, opts ...grpc.DialOption) (*Conn, error)
NewClient connection to a gRPC server.
Conn.Close
func (c *Conn) Close() error
Close the gRPC client connection.
Conn.Register
func (c *Conn) Register(r *service.Registry) error
Register the services which are accessible through the connection.
Service
type Service struct {
// contains filtered or unexported fields
}
Service.CreateInstance
func (s *Service) CreateInstance(ctx Context, config service.InstanceConfig, snapshot []byte) (service.Instance, error)
Service.Discoverable
func (s *Service) Discoverable(ctx Context) bool
Service.Properties
func (s *Service) Properties() service.Properties