package adapterpb
import "cloud.google.com/go/spanner/adapter/apiv1/adapterpb"
Index ¶
- Constants
- Variables
- func RegisterAdapterServer(s grpc.ServiceRegistrar, srv AdapterServer)
- type AdaptMessageRequest
- func (*AdaptMessageRequest) Descriptor() ([]byte, []int)
- func (x *AdaptMessageRequest) GetAttachments() map[string]string
- func (x *AdaptMessageRequest) GetName() string
- func (x *AdaptMessageRequest) GetPayload() []byte
- func (x *AdaptMessageRequest) GetProtocol() string
- func (*AdaptMessageRequest) ProtoMessage()
- func (x *AdaptMessageRequest) ProtoReflect() protoreflect.Message
- func (x *AdaptMessageRequest) Reset()
- func (x *AdaptMessageRequest) String() string
- type AdaptMessageResponse
- func (*AdaptMessageResponse) Descriptor() ([]byte, []int)
- func (x *AdaptMessageResponse) GetLast() bool
- func (x *AdaptMessageResponse) GetPayload() []byte
- func (x *AdaptMessageResponse) GetStateUpdates() map[string]string
- func (*AdaptMessageResponse) ProtoMessage()
- func (x *AdaptMessageResponse) ProtoReflect() protoreflect.Message
- func (x *AdaptMessageResponse) Reset()
- func (x *AdaptMessageResponse) String() string
- type AdapterClient
- type AdapterServer
- type Adapter_AdaptMessageClient
- type Adapter_AdaptMessageServer
- type CreateSessionRequest
- func (*CreateSessionRequest) Descriptor() ([]byte, []int)
- func (x *CreateSessionRequest) GetParent() string
- func (x *CreateSessionRequest) GetSession() *Session
- func (*CreateSessionRequest) ProtoMessage()
- func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSessionRequest) Reset()
- func (x *CreateSessionRequest) String() string
- type Session
- func (*Session) Descriptor() ([]byte, []int)
- func (x *Session) GetName() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type UnimplementedAdapterServer
- func (UnimplementedAdapterServer) AdaptMessage(*AdaptMessageRequest, Adapter_AdaptMessageServer) error
- func (UnimplementedAdapterServer) CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
- type UnsafeAdapterServer
Constants ¶
const ( Adapter_CreateSession_FullMethodName = "/google.spanner.adapter.v1.Adapter/CreateSession" Adapter_AdaptMessage_FullMethodName = "/google.spanner.adapter.v1.Adapter/AdaptMessage" )
Variables ¶
var Adapter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.spanner.adapter.v1.Adapter", HandlerType: (*AdapterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateSession", Handler: _Adapter_CreateSession_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "AdaptMessage", Handler: _Adapter_AdaptMessage_Handler, ServerStreams: true, }, }, Metadata: "google/spanner/adapter/v1/adapter.proto", }
Adapter_ServiceDesc is the grpc.ServiceDesc for Adapter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_google_spanner_adapter_v1_adapter_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdapterServer ¶
func RegisterAdapterServer(s grpc.ServiceRegistrar, srv AdapterServer)
Types ¶
type AdaptMessageRequest ¶
type AdaptMessageRequest struct {
// Required. The database session in which the adapter request is processed.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Identifier for the underlying wire protocol.
Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
// Optional. Uninterpreted bytes from the underlying wire protocol.
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
// Optional. Opaque request state passed by the client to the server.
Attachments map[string]string `protobuf:"bytes,4,rep,name=attachments,proto3" json:"attachments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// contains filtered or unexported fields
}
Message sent by the client to the adapter.
func (*AdaptMessageRequest) Descriptor ¶
func (*AdaptMessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use AdaptMessageRequest.ProtoReflect.Descriptor instead.
func (*AdaptMessageRequest) GetAttachments ¶
func (x *AdaptMessageRequest) GetAttachments() map[string]string
func (*AdaptMessageRequest) GetName ¶
func (x *AdaptMessageRequest) GetName() string
func (*AdaptMessageRequest) GetPayload ¶
func (x *AdaptMessageRequest) GetPayload() []byte
func (*AdaptMessageRequest) GetProtocol ¶
func (x *AdaptMessageRequest) GetProtocol() string
func (*AdaptMessageRequest) ProtoMessage ¶
func (*AdaptMessageRequest) ProtoMessage()
func (*AdaptMessageRequest) ProtoReflect ¶
func (x *AdaptMessageRequest) ProtoReflect() protoreflect.Message
func (*AdaptMessageRequest) Reset ¶
func (x *AdaptMessageRequest) Reset()
func (*AdaptMessageRequest) String ¶
func (x *AdaptMessageRequest) String() string
type AdaptMessageResponse ¶
type AdaptMessageResponse struct {
// Optional. Uninterpreted bytes from the underlying wire protocol.
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
// Optional. Opaque state updates to be applied by the client.
StateUpdates map[string]string `protobuf:"bytes,2,rep,name=state_updates,json=stateUpdates,proto3" json:"state_updates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Optional. Indicates whether this is the last
// [AdaptMessageResponse][google.spanner.adapter.v1.AdaptMessageResponse] in
// the stream. This field may be optionally set by the server. Clients should
// not rely on this field being set in all cases.
Last bool `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
// contains filtered or unexported fields
}
Message sent by the adapter to the client.
func (*AdaptMessageResponse) Descriptor ¶
func (*AdaptMessageResponse) Descriptor() ([]byte, []int)
Deprecated: Use AdaptMessageResponse.ProtoReflect.Descriptor instead.
func (*AdaptMessageResponse) GetLast ¶
func (x *AdaptMessageResponse) GetLast() bool
func (*AdaptMessageResponse) GetPayload ¶
func (x *AdaptMessageResponse) GetPayload() []byte
func (*AdaptMessageResponse) GetStateUpdates ¶
func (x *AdaptMessageResponse) GetStateUpdates() map[string]string
func (*AdaptMessageResponse) ProtoMessage ¶
func (*AdaptMessageResponse) ProtoMessage()
func (*AdaptMessageResponse) ProtoReflect ¶
func (x *AdaptMessageResponse) ProtoReflect() protoreflect.Message
func (*AdaptMessageResponse) Reset ¶
func (x *AdaptMessageResponse) Reset()
func (*AdaptMessageResponse) String ¶
func (x *AdaptMessageResponse) String() string
type AdapterClient ¶
type AdapterClient interface {
// Creates a new session to be used for requests made by the adapter.
// A session identifies a specific incarnation of a database resource and is
// meant to be reused across many `AdaptMessage` calls.
CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*Session, error)
// Handles a single message from the client and returns the result as a
// stream. The server will interpret the message frame and respond with
// message frames to the client.
AdaptMessage(ctx context.Context, in *AdaptMessageRequest, opts ...grpc.CallOption) (Adapter_AdaptMessageClient, error)
}
AdapterClient is the client API for Adapter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAdapterClient ¶
func NewAdapterClient(cc grpc.ClientConnInterface) AdapterClient
type AdapterServer ¶
type AdapterServer interface {
// Creates a new session to be used for requests made by the adapter.
// A session identifies a specific incarnation of a database resource and is
// meant to be reused across many `AdaptMessage` calls.
CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
// Handles a single message from the client and returns the result as a
// stream. The server will interpret the message frame and respond with
// message frames to the client.
AdaptMessage(*AdaptMessageRequest, Adapter_AdaptMessageServer) error
}
AdapterServer is the server API for Adapter service. All implementations should embed UnimplementedAdapterServer for forward compatibility
type Adapter_AdaptMessageClient ¶
type Adapter_AdaptMessageClient interface {
Recv() (*AdaptMessageResponse, error)
grpc.ClientStream
}
type Adapter_AdaptMessageServer ¶
type Adapter_AdaptMessageServer interface {
Send(*AdaptMessageResponse) error
grpc.ServerStream
}
type CreateSessionRequest ¶
type CreateSessionRequest struct {
// Required. The database in which the new session is created.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The session to create.
Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
// contains filtered or unexported fields
}
The request for CreateSessionRequest[Adapter.CreateSessionRequest].
func (*CreateSessionRequest) Descriptor ¶
func (*CreateSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateSessionRequest) GetParent ¶
func (x *CreateSessionRequest) GetParent() string
func (*CreateSessionRequest) GetSession ¶
func (x *CreateSessionRequest) GetSession() *Session
func (*CreateSessionRequest) ProtoMessage ¶
func (*CreateSessionRequest) ProtoMessage()
func (*CreateSessionRequest) ProtoReflect ¶
func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
func (*CreateSessionRequest) Reset ¶
func (x *CreateSessionRequest) Reset()
func (*CreateSessionRequest) String ¶
func (x *CreateSessionRequest) String() string
type Session ¶
type Session struct {
// Identifier. The name of the session. This is always system-assigned.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
A session in the Cloud Spanner Adapter API.
func (*Session) Descriptor ¶
Deprecated: Use Session.ProtoReflect.Descriptor instead.
func (*Session) GetName ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
func (*Session) Reset ¶
func (x *Session) Reset()
func (*Session) String ¶
type UnimplementedAdapterServer ¶
type UnimplementedAdapterServer struct {
}
UnimplementedAdapterServer should be embedded to have forward compatible implementations.
func (UnimplementedAdapterServer) AdaptMessage ¶
func (UnimplementedAdapterServer) AdaptMessage(*AdaptMessageRequest, Adapter_AdaptMessageServer) error
func (UnimplementedAdapterServer) CreateSession ¶
func (UnimplementedAdapterServer) CreateSession(context.Context, *CreateSessionRequest) (*Session, error)
type UnsafeAdapterServer ¶
type UnsafeAdapterServer interface {
// contains filtered or unexported methods
}
UnsafeAdapterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdapterServer will result in compilation errors.
Source Files ¶
adapter.pb.go adapter_grpc.pb.go
- Version
- v1.87.0
- Published
- Dec 15, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 4 minutes ago –
Tools for package owners.