gravity_api_transmitter

package
v0.2.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataType_name = map[int32]string{
	0: "BOOLEAN",
	1: "BINARY",
	2: "STRING",
	3: "UINT64",
	4: "INT64",
	5: "FLOAT64",
	6: "ARRAY",
	7: "MAP",
}
View Source
var DataType_value = map[string]int32{
	"BOOLEAN": 0,
	"BINARY":  1,
	"STRING":  2,
	"UINT64":  3,
	"INT64":   4,
	"FLOAT64": 5,
	"ARRAY":   6,
	"MAP":     7,
}
View Source
var Method_name = map[int32]string{
	0: "INSERT",
	1: "UPDATE",
	2: "DELETE",
	3: "TRUNCATE",
}
View Source
var Method_value = map[string]int32{
	"INSERT":   0,
	"UPDATE":   1,
	"DELETE":   2,
	"TRUNCATE": 3,
}

Functions

func RegisterTransmitterServer

func RegisterTransmitterServer(s *grpc.Server, srv TransmitterServer)

Types

type ArrayValue

type ArrayValue struct {
	Elements             []*Value `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ArrayValue) Descriptor

func (*ArrayValue) Descriptor() ([]byte, []int)

func (*ArrayValue) GetElements

func (m *ArrayValue) GetElements() []*Value

func (*ArrayValue) ProtoMessage

func (*ArrayValue) ProtoMessage()

func (*ArrayValue) Reset

func (m *ArrayValue) Reset()

func (*ArrayValue) String

func (m *ArrayValue) String() string

func (*ArrayValue) XXX_DiscardUnknown

func (m *ArrayValue) XXX_DiscardUnknown()

func (*ArrayValue) XXX_Marshal

func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ArrayValue) XXX_Merge

func (m *ArrayValue) XXX_Merge(src proto.Message)

func (*ArrayValue) XXX_Size

func (m *ArrayValue) XXX_Size() int

func (*ArrayValue) XXX_Unmarshal

func (m *ArrayValue) XXX_Unmarshal(b []byte) error

type DataType

type DataType int32
const (
	DataType_BOOLEAN DataType = 0
	DataType_BINARY  DataType = 1
	DataType_STRING  DataType = 2
	DataType_UINT64  DataType = 3
	DataType_INT64   DataType = 4
	DataType_FLOAT64 DataType = 5
	DataType_ARRAY   DataType = 6
	DataType_MAP     DataType = 7
)

func (DataType) EnumDescriptor

func (DataType) EnumDescriptor() ([]byte, []int)

func (DataType) String

func (x DataType) String() string

type Field

type Field struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value                *Value   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Field) Descriptor

func (*Field) Descriptor() ([]byte, []int)

func (*Field) GetName

func (m *Field) GetName() string

func (*Field) GetValue

func (m *Field) GetValue() *Value

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

func (*Field) XXX_DiscardUnknown

func (m *Field) XXX_DiscardUnknown()

func (*Field) XXX_Marshal

func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Field) XXX_Merge

func (m *Field) XXX_Merge(src proto.Message)

func (*Field) XXX_Size

func (m *Field) XXX_Size() int

func (*Field) XXX_Unmarshal

func (m *Field) XXX_Unmarshal(b []byte) error

type MapValue

type MapValue struct {
	Fields               []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MapValue) Descriptor

func (*MapValue) Descriptor() ([]byte, []int)

func (*MapValue) GetFields

func (m *MapValue) GetFields() []*Field

func (*MapValue) ProtoMessage

func (*MapValue) ProtoMessage()

func (*MapValue) Reset

func (m *MapValue) Reset()

func (*MapValue) String

func (m *MapValue) String() string

func (*MapValue) XXX_DiscardUnknown

func (m *MapValue) XXX_DiscardUnknown()

func (*MapValue) XXX_Marshal

func (m *MapValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapValue) XXX_Merge

func (m *MapValue) XXX_Merge(src proto.Message)

func (*MapValue) XXX_Size

func (m *MapValue) XXX_Size() int

func (*MapValue) XXX_Unmarshal

func (m *MapValue) XXX_Unmarshal(b []byte) error

type Method

type Method int32
const (
	Method_INSERT   Method = 0
	Method_UPDATE   Method = 1
	Method_DELETE   Method = 2
	Method_TRUNCATE Method = 3
)

func (Method) EnumDescriptor

func (Method) EnumDescriptor() ([]byte, []int)

func (Method) String

func (x Method) String() string

type Record

type Record struct {
	EventName            string   `protobuf:"bytes,1,opt,name=eventName,proto3" json:"eventName,omitempty"`
	Table                string   `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	Method               Method   `protobuf:"varint,3,opt,name=method,proto3,enum=gravity.api.transmitter.Method" json:"method,omitempty"`
	PrimaryKey           string   `protobuf:"bytes,4,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	Fields               []*Field `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Record) Descriptor

func (*Record) Descriptor() ([]byte, []int)

func (*Record) GetEventName

func (m *Record) GetEventName() string

func (*Record) GetFields

func (m *Record) GetFields() []*Field

func (*Record) GetMethod

func (m *Record) GetMethod() Method

func (*Record) GetPrimaryKey

func (m *Record) GetPrimaryKey() string

func (*Record) GetTable

func (m *Record) GetTable() string

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) String

func (m *Record) String() string

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type SendReply

type SendReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Reason               string   `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendReply) Descriptor

func (*SendReply) Descriptor() ([]byte, []int)

func (*SendReply) GetReason

func (m *SendReply) GetReason() string

func (*SendReply) GetSuccess

func (m *SendReply) GetSuccess() bool

func (*SendReply) ProtoMessage

func (*SendReply) ProtoMessage()

func (*SendReply) Reset

func (m *SendReply) Reset()

func (*SendReply) String

func (m *SendReply) String() string

func (*SendReply) XXX_DiscardUnknown

func (m *SendReply) XXX_DiscardUnknown()

func (*SendReply) XXX_Marshal

func (m *SendReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SendReply) XXX_Merge

func (m *SendReply) XXX_Merge(src proto.Message)

func (*SendReply) XXX_Size

func (m *SendReply) XXX_Size() int

func (*SendReply) XXX_Unmarshal

func (m *SendReply) XXX_Unmarshal(b []byte) error

type TransmitterClient

type TransmitterClient interface {
	Send(ctx context.Context, in *Record, opts ...grpc.CallOption) (*SendReply, error)
	Truncate(ctx context.Context, in *TruncateRequest, opts ...grpc.CallOption) (*TruncateReply, error)
}

TransmitterClient is the client API for Transmitter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTransmitterClient

func NewTransmitterClient(cc *grpc.ClientConn) TransmitterClient

type TransmitterServer

type TransmitterServer interface {
	Send(context.Context, *Record) (*SendReply, error)
	Truncate(context.Context, *TruncateRequest) (*TruncateReply, error)
}

TransmitterServer is the server API for Transmitter service.

type TruncateReply

type TruncateReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Reason               string   `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TruncateReply) Descriptor

func (*TruncateReply) Descriptor() ([]byte, []int)

func (*TruncateReply) GetReason

func (m *TruncateReply) GetReason() string

func (*TruncateReply) GetSuccess

func (m *TruncateReply) GetSuccess() bool

func (*TruncateReply) ProtoMessage

func (*TruncateReply) ProtoMessage()

func (*TruncateReply) Reset

func (m *TruncateReply) Reset()

func (*TruncateReply) String

func (m *TruncateReply) String() string

func (*TruncateReply) XXX_DiscardUnknown

func (m *TruncateReply) XXX_DiscardUnknown()

func (*TruncateReply) XXX_Marshal

func (m *TruncateReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TruncateReply) XXX_Merge

func (m *TruncateReply) XXX_Merge(src proto.Message)

func (*TruncateReply) XXX_Size

func (m *TruncateReply) XXX_Size() int

func (*TruncateReply) XXX_Unmarshal

func (m *TruncateReply) XXX_Unmarshal(b []byte) error

type TruncateRequest

type TruncateRequest struct {
	Table                string   `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TruncateRequest) Descriptor

func (*TruncateRequest) Descriptor() ([]byte, []int)

func (*TruncateRequest) GetTable

func (m *TruncateRequest) GetTable() string

func (*TruncateRequest) ProtoMessage

func (*TruncateRequest) ProtoMessage()

func (*TruncateRequest) Reset

func (m *TruncateRequest) Reset()

func (*TruncateRequest) String

func (m *TruncateRequest) String() string

func (*TruncateRequest) XXX_DiscardUnknown

func (m *TruncateRequest) XXX_DiscardUnknown()

func (*TruncateRequest) XXX_Marshal

func (m *TruncateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TruncateRequest) XXX_Merge

func (m *TruncateRequest) XXX_Merge(src proto.Message)

func (*TruncateRequest) XXX_Size

func (m *TruncateRequest) XXX_Size() int

func (*TruncateRequest) XXX_Unmarshal

func (m *TruncateRequest) XXX_Unmarshal(b []byte) error

type UnimplementedTransmitterServer

type UnimplementedTransmitterServer struct {
}

UnimplementedTransmitterServer can be embedded to have forward compatible implementations.

func (*UnimplementedTransmitterServer) Send

func (*UnimplementedTransmitterServer) Truncate

type Value

type Value struct {
	Type                 DataType    `protobuf:"varint,1,opt,name=type,proto3,enum=gravity.api.transmitter.DataType" json:"type,omitempty"`
	Value                []byte      `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Map                  *MapValue   `protobuf:"bytes,3,opt,name=map,proto3" json:"map,omitempty"`
	Array                *ArrayValue `protobuf:"bytes,4,opt,name=array,proto3" json:"array,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Value) Descriptor

func (*Value) Descriptor() ([]byte, []int)

func (*Value) GetArray

func (m *Value) GetArray() *ArrayValue

func (*Value) GetMap

func (m *Value) GetMap() *MapValue

func (*Value) GetType

func (m *Value) GetType() DataType

func (*Value) GetValue

func (m *Value) GetValue() []byte

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Value) XXX_Merge

func (m *Value) XXX_Merge(src proto.Message)

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

func (m *Value) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL