Documentation ¶
Index ¶
- Constants
- Variables
- func ContextWithError(ctx context.Context, e error) context.Context
- func ErrorFromContext(ctx context.Context) error
- func RegisterDeltaLakeDiffPlugin(ds *Service, pid plugins.PluginIdentity, handshake plugins.PluginHandshake)
- func RegisterTableDifferServer(s grpc.ServiceRegistrar, srv TableDifferServer)
- type ControllerTestDiffer
- type DeltaDiffGRPCPlugin
- type DeltaLakeDiffer
- type DiffEntry
- type DiffProps
- func (*DiffProps) Descriptor() ([]byte, []int)deprecated
- func (x *DiffProps) GetBaseTablePath() *TablePath
- func (x *DiffProps) GetLeftTablePath() *TablePath
- func (x *DiffProps) GetRepo() string
- func (x *DiffProps) GetRightTablePath() *TablePath
- func (*DiffProps) ProtoMessage()
- func (x *DiffProps) ProtoReflect() protoreflect.Message
- func (x *DiffProps) Reset()
- func (x *DiffProps) String() string
- type DiffType
- type Differ
- type GatewayConfig
- func (*GatewayConfig) Descriptor() ([]byte, []int)deprecated
- func (x *GatewayConfig) GetEndpoint() string
- func (x *GatewayConfig) GetKey() string
- func (x *GatewayConfig) GetSecret() string
- func (*GatewayConfig) ProtoMessage()
- func (x *GatewayConfig) ProtoReflect() protoreflect.Message
- func (x *GatewayConfig) Reset()
- func (x *GatewayConfig) String() string
- type MockHandler
- type OperationType
- func (OperationType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationType) Enum() *OperationType
- func (OperationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationType) Number() protoreflect.EnumNumber
- func (x OperationType) String() string
- func (OperationType) Type() protoreflect.EnumType
- type Params
- type RefPath
- type Response
- type S3Creds
- type Service
- type ShowHistoryRequest
- func (*ShowHistoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ShowHistoryRequest) GetPath() *TablePath
- func (*ShowHistoryRequest) ProtoMessage()
- func (x *ShowHistoryRequest) ProtoReflect() protoreflect.Message
- func (x *ShowHistoryRequest) Reset()
- func (x *ShowHistoryRequest) String() string
- type ShowHistoryResponse
- func (*ShowHistoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShowHistoryResponse) GetEntries() []*TableOperation
- func (*ShowHistoryResponse) ProtoMessage()
- func (x *ShowHistoryResponse) ProtoReflect() protoreflect.Message
- func (x *ShowHistoryResponse) Reset()
- func (x *ShowHistoryResponse) String() string
- type TableDiffRequest
- func (*TableDiffRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TableDiffRequest) GetGatewayConfig() *GatewayConfig
- func (x *TableDiffRequest) GetProps() *DiffProps
- func (*TableDiffRequest) ProtoMessage()
- func (x *TableDiffRequest) ProtoReflect() protoreflect.Message
- func (x *TableDiffRequest) Reset()
- func (x *TableDiffRequest) String() string
- type TableDiffResponse
- func (*TableDiffResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TableDiffResponse) GetDiffType() DiffType
- func (x *TableDiffResponse) GetEntries() []*TableOperation
- func (*TableDiffResponse) ProtoMessage()
- func (x *TableDiffResponse) ProtoReflect() protoreflect.Message
- func (x *TableDiffResponse) Reset()
- func (x *TableDiffResponse) String() string
- type TableDifferClient
- type TableDifferServer
- type TableOperation
- func (*TableOperation) Descriptor() ([]byte, []int)deprecated
- func (x *TableOperation) GetContent() map[string]string
- func (x *TableOperation) GetId() string
- func (x *TableOperation) GetOperation() string
- func (x *TableOperation) GetOperationType() OperationType
- func (x *TableOperation) GetTimestamp() *timestamppb.Timestamp
- func (*TableOperation) ProtoMessage()
- func (x *TableOperation) ProtoReflect() protoreflect.Message
- func (x *TableOperation) Reset()
- func (x *TableOperation) String() string
- type TablePath
- type TablePaths
- type TestDiffer
- type UnimplementedTableDifferServer
- type UnsafeTableDifferServer
Constants ¶
const ( DiffTypeChanged = "changed" DiffTypeDropped = "dropped" DiffTypeCreated = "created" OpTypeCreate = "create" OpTypeUpdate = "update" OpTypeDelete = "delete" OpTypeUnknown = "unknown" )
const ( ControllerTestPlugin = "controller" PluginPath = "plugin_path" PluginVersion = "plugin_version" )
Variables ¶
var ( ErrTableNotFound = errors.New("table not found") ErrLoadingPlugin = errors.New("failed to load diff plugin") ErrFailedDiff = errors.New("failed to run diff") )
var ( DiffType_name = map[int32]string{ 0: "CHANGED", 1: "CREATED", 2: "DROPPED", } DiffType_value = map[string]int32{ "CHANGED": 0, "CREATED": 1, "DROPPED": 2, } )
Enum value maps for DiffType.
var ( OperationType_name = map[int32]string{ 0: "CREATE", 1: "UPDATE", 2: "DELETE", 3: "UNKNOWN", } OperationType_value = map[string]int32{ "CREATE": 0, "UPDATE": 1, "DELETE": 2, "UNKNOWN": 3, } )
Enum value maps for OperationType.
var ErrDiffFailed = errors.New("failed")
var ErrNotFound = errors.New("plugin not found")
var File_plugins_diff_table_diff_proto protoreflect.FileDescriptor
var TableDiffer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "diff.TableDiffer", HandlerType: (*TableDifferServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TableDiff", Handler: _TableDiffer_TableDiff_Handler, }, { MethodName: "ShowHistory", Handler: _TableDiffer_ShowHistory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "table_diff.proto", }
TableDiffer_ServiceDesc is the grpc.ServiceDesc for TableDiffer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ContextWithError ¶ added in v0.94.0
func ErrorFromContext ¶ added in v0.94.0
func RegisterDeltaLakeDiffPlugin ¶ added in v0.94.0
func RegisterDeltaLakeDiffPlugin(ds *Service, pid plugins.PluginIdentity, handshake plugins.PluginHandshake)
func RegisterTableDifferServer ¶
func RegisterTableDifferServer(s grpc.ServiceRegistrar, srv TableDifferServer)
Types ¶
type ControllerTestDiffer ¶ added in v0.94.0
type ControllerTestDiffer struct{}
type DeltaDiffGRPCPlugin ¶ added in v0.94.0
type DeltaDiffGRPCPlugin struct {
// DeltaDiffGRPCPlugin must implement the Plugin interface
plugin.Plugin
}
DeltaDiffGRPCPlugin is responsible for generating a client and a server for the Delta Lake Diff plugin implementation.
func (DeltaDiffGRPCPlugin) GRPCClient ¶ added in v0.94.0
func (p DeltaDiffGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient will return the Delta diff GRPC custom client
func (DeltaDiffGRPCPlugin) GRPCServer ¶ added in v0.94.0
func (p DeltaDiffGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
GRPCServer must be implemented even though we won't use it. Delta Lake's server implementation is written in Rust.
type DeltaLakeDiffer ¶ added in v0.94.0
type DeltaLakeDiffer struct {
// contains filtered or unexported fields
}
type DiffProps ¶
type DiffProps struct { Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` LeftTablePath *TablePath `protobuf:"bytes,2,opt,name=left_table_path,json=leftTablePath,proto3" json:"left_table_path,omitempty"` RightTablePath *TablePath `protobuf:"bytes,3,opt,name=right_table_path,json=rightTablePath,proto3" json:"right_table_path,omitempty"` BaseTablePath *TablePath `protobuf:"bytes,4,opt,name=base_table_path,json=baseTablePath,proto3,oneof" json:"base_table_path,omitempty"` // contains filtered or unexported fields }
func (*DiffProps) Descriptor
deprecated
func (*DiffProps) GetBaseTablePath ¶
func (*DiffProps) GetLeftTablePath ¶
func (*DiffProps) GetRightTablePath ¶
func (*DiffProps) ProtoMessage ¶
func (*DiffProps) ProtoMessage()
func (*DiffProps) ProtoReflect ¶
func (x *DiffProps) ProtoReflect() protoreflect.Message
type DiffType ¶ added in v0.94.0
type DiffType int32
func (DiffType) Descriptor ¶ added in v0.94.0
func (DiffType) Descriptor() protoreflect.EnumDescriptor
func (DiffType) EnumDescriptor
deprecated
added in
v0.94.0
func (DiffType) Number ¶ added in v0.94.0
func (x DiffType) Number() protoreflect.EnumNumber
func (DiffType) Type ¶ added in v0.94.0
func (DiffType) Type() protoreflect.EnumType
type GatewayConfig ¶
type GatewayConfig struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // contains filtered or unexported fields }
func (*GatewayConfig) Descriptor
deprecated
func (*GatewayConfig) Descriptor() ([]byte, []int)
Deprecated: Use GatewayConfig.ProtoReflect.Descriptor instead.
func (*GatewayConfig) GetEndpoint ¶
func (x *GatewayConfig) GetEndpoint() string
func (*GatewayConfig) GetKey ¶
func (x *GatewayConfig) GetKey() string
func (*GatewayConfig) GetSecret ¶
func (x *GatewayConfig) GetSecret() string
func (*GatewayConfig) ProtoMessage ¶
func (*GatewayConfig) ProtoMessage()
func (*GatewayConfig) ProtoReflect ¶
func (x *GatewayConfig) ProtoReflect() protoreflect.Message
func (*GatewayConfig) Reset ¶
func (x *GatewayConfig) Reset()
func (*GatewayConfig) String ¶
func (x *GatewayConfig) String() string
type MockHandler ¶ added in v0.94.0
type MockHandler struct {
// contains filtered or unexported fields
}
func NewMockHandler ¶ added in v0.94.0
func NewMockHandler() *MockHandler
func (*MockHandler) LoadPluginClient ¶ added in v0.94.0
func (mh *MockHandler) LoadPluginClient(name string) (Differ, func(), error)
func (*MockHandler) Plugins ¶ added in v0.98.0
func (mh *MockHandler) Plugins() []string
func (*MockHandler) RegisterPlugin ¶ added in v0.94.0
func (mh *MockHandler) RegisterPlugin(name string, pp internal.HCPluginProperties)
type OperationType ¶ added in v0.94.0
type OperationType int32
const ( OperationType_CREATE OperationType = 0 OperationType_UPDATE OperationType = 1 OperationType_DELETE OperationType = 2 OperationType_UNKNOWN OperationType = 3 )
func (OperationType) Descriptor ¶ added in v0.94.0
func (OperationType) Descriptor() protoreflect.EnumDescriptor
func (OperationType) Enum ¶ added in v0.94.0
func (x OperationType) Enum() *OperationType
func (OperationType) EnumDescriptor
deprecated
added in
v0.94.0
func (OperationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationType.Descriptor instead.
func (OperationType) Number ¶ added in v0.94.0
func (x OperationType) Number() protoreflect.EnumNumber
func (OperationType) String ¶ added in v0.94.0
func (x OperationType) String() string
func (OperationType) Type ¶ added in v0.94.0
func (OperationType) Type() protoreflect.EnumType
type Params ¶ added in v0.94.0
type Params struct { TablePaths TablePaths S3Creds S3Creds Repo string }
type S3Creds ¶ added in v0.94.0
type S3Creds struct { Key config.SecureString Secret config.SecureString Endpoint string }
type Service ¶ added in v0.94.0
type Service struct {
// contains filtered or unexported fields
}
Service is responsible for registering new Differ plugins and executing them at will. After initializing a Service, the CloseClients method should be called at some point to close gracefully all remaining plugins.
func NewMockService ¶ added in v0.94.0
func NewMockService() *Service
func NewService ¶ added in v0.94.0
NewService is used to initialize a new Differ service. The returned function is a closing function for the service.
func (*Service) Close ¶ added in v0.94.0
func (s *Service) Close()
Close should be called upon the destruction of the Service.
func (*Service) EnabledDiffs ¶ added in v0.98.0
type ShowHistoryRequest ¶ added in v1.0.0
type ShowHistoryRequest struct { Path *TablePath `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*ShowHistoryRequest) Descriptor
deprecated
added in
v1.0.0
func (*ShowHistoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShowHistoryRequest.ProtoReflect.Descriptor instead.
func (*ShowHistoryRequest) GetPath ¶ added in v1.0.0
func (x *ShowHistoryRequest) GetPath() *TablePath
func (*ShowHistoryRequest) ProtoMessage ¶ added in v1.0.0
func (*ShowHistoryRequest) ProtoMessage()
func (*ShowHistoryRequest) ProtoReflect ¶ added in v1.0.0
func (x *ShowHistoryRequest) ProtoReflect() protoreflect.Message
func (*ShowHistoryRequest) Reset ¶ added in v1.0.0
func (x *ShowHistoryRequest) Reset()
func (*ShowHistoryRequest) String ¶ added in v1.0.0
func (x *ShowHistoryRequest) String() string
type ShowHistoryResponse ¶ added in v1.0.0
type ShowHistoryResponse struct { Entries []*TableOperation `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // contains filtered or unexported fields }
func (*ShowHistoryResponse) Descriptor
deprecated
added in
v1.0.0
func (*ShowHistoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShowHistoryResponse.ProtoReflect.Descriptor instead.
func (*ShowHistoryResponse) GetEntries ¶ added in v1.0.0
func (x *ShowHistoryResponse) GetEntries() []*TableOperation
func (*ShowHistoryResponse) ProtoMessage ¶ added in v1.0.0
func (*ShowHistoryResponse) ProtoMessage()
func (*ShowHistoryResponse) ProtoReflect ¶ added in v1.0.0
func (x *ShowHistoryResponse) ProtoReflect() protoreflect.Message
func (*ShowHistoryResponse) Reset ¶ added in v1.0.0
func (x *ShowHistoryResponse) Reset()
func (*ShowHistoryResponse) String ¶ added in v1.0.0
func (x *ShowHistoryResponse) String() string
type TableDiffRequest ¶ added in v1.0.0
type TableDiffRequest struct { Props *DiffProps `protobuf:"bytes,1,opt,name=props,proto3" json:"props,omitempty"` GatewayConfig *GatewayConfig `protobuf:"bytes,2,opt,name=gateway_config,json=gatewayConfig,proto3" json:"gateway_config,omitempty"` // contains filtered or unexported fields }
func (*TableDiffRequest) Descriptor
deprecated
added in
v1.0.0
func (*TableDiffRequest) Descriptor() ([]byte, []int)
Deprecated: Use TableDiffRequest.ProtoReflect.Descriptor instead.
func (*TableDiffRequest) GetGatewayConfig ¶ added in v1.0.0
func (x *TableDiffRequest) GetGatewayConfig() *GatewayConfig
func (*TableDiffRequest) GetProps ¶ added in v1.0.0
func (x *TableDiffRequest) GetProps() *DiffProps
func (*TableDiffRequest) ProtoMessage ¶ added in v1.0.0
func (*TableDiffRequest) ProtoMessage()
func (*TableDiffRequest) ProtoReflect ¶ added in v1.0.0
func (x *TableDiffRequest) ProtoReflect() protoreflect.Message
func (*TableDiffRequest) Reset ¶ added in v1.0.0
func (x *TableDiffRequest) Reset()
func (*TableDiffRequest) String ¶ added in v1.0.0
func (x *TableDiffRequest) String() string
type TableDiffResponse ¶ added in v1.0.0
type TableDiffResponse struct { Entries []*TableOperation `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` DiffType DiffType `protobuf:"varint,2,opt,name=diff_type,json=diffType,proto3,enum=diff.DiffType" json:"diff_type,omitempty"` // contains filtered or unexported fields }
func (*TableDiffResponse) Descriptor
deprecated
added in
v1.0.0
func (*TableDiffResponse) Descriptor() ([]byte, []int)
Deprecated: Use TableDiffResponse.ProtoReflect.Descriptor instead.
func (*TableDiffResponse) GetDiffType ¶ added in v1.0.0
func (x *TableDiffResponse) GetDiffType() DiffType
func (*TableDiffResponse) GetEntries ¶ added in v1.0.0
func (x *TableDiffResponse) GetEntries() []*TableOperation
func (*TableDiffResponse) ProtoMessage ¶ added in v1.0.0
func (*TableDiffResponse) ProtoMessage()
func (*TableDiffResponse) ProtoReflect ¶ added in v1.0.0
func (x *TableDiffResponse) ProtoReflect() protoreflect.Message
func (*TableDiffResponse) Reset ¶ added in v1.0.0
func (x *TableDiffResponse) Reset()
func (*TableDiffResponse) String ¶ added in v1.0.0
func (x *TableDiffResponse) String() string
type TableDifferClient ¶
type TableDifferClient interface { TableDiff(ctx context.Context, in *TableDiffRequest, opts ...grpc.CallOption) (*TableDiffResponse, error) ShowHistory(ctx context.Context, in *ShowHistoryRequest, opts ...grpc.CallOption) (*ShowHistoryResponse, error) }
TableDifferClient is the client API for TableDiffer 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 NewTableDifferClient ¶
func NewTableDifferClient(cc grpc.ClientConnInterface) TableDifferClient
type TableDifferServer ¶
type TableDifferServer interface { TableDiff(context.Context, *TableDiffRequest) (*TableDiffResponse, error) ShowHistory(context.Context, *ShowHistoryRequest) (*ShowHistoryResponse, error) // contains filtered or unexported methods }
TableDifferServer is the server API for TableDiffer service. All implementations must embed UnimplementedTableDifferServer for forward compatibility
type TableOperation ¶
type TableOperation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Operation string `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"` Content map[string]string `` /* 155-byte string literal not displayed */ OperationType OperationType `protobuf:"varint,5,opt,name=operation_type,json=operationType,proto3,enum=diff.OperationType" json:"operation_type,omitempty"` // contains filtered or unexported fields }
Example id: "2" timestamp: 2023-02-05T01:30:15.01Z operation: "DELETE" content: { "predicate": "[\"(spark_catalog.delta.lakefs://repo/branch/my-delta-lake-table/.`feature` < 5.0D)\"]"} }
func (*TableOperation) Descriptor
deprecated
func (*TableOperation) Descriptor() ([]byte, []int)
Deprecated: Use TableOperation.ProtoReflect.Descriptor instead.
func (*TableOperation) GetContent ¶
func (x *TableOperation) GetContent() map[string]string
func (*TableOperation) GetId ¶
func (x *TableOperation) GetId() string
func (*TableOperation) GetOperation ¶
func (x *TableOperation) GetOperation() string
func (*TableOperation) GetOperationType ¶ added in v0.94.0
func (x *TableOperation) GetOperationType() OperationType
func (*TableOperation) GetTimestamp ¶
func (x *TableOperation) GetTimestamp() *timestamppb.Timestamp
func (*TableOperation) ProtoMessage ¶
func (*TableOperation) ProtoMessage()
func (*TableOperation) ProtoReflect ¶
func (x *TableOperation) ProtoReflect() protoreflect.Message
func (*TableOperation) Reset ¶
func (x *TableOperation) Reset()
func (*TableOperation) String ¶
func (x *TableOperation) String() string
type TablePath ¶
type TablePath struct { Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*TablePath) Descriptor
deprecated
func (*TablePath) ProtoMessage ¶
func (*TablePath) ProtoMessage()
func (*TablePath) ProtoReflect ¶
func (x *TablePath) ProtoReflect() protoreflect.Message
type TablePaths ¶ added in v0.94.0
type TestDiffer ¶ added in v0.94.0
type TestDiffer struct {
// contains filtered or unexported fields
}
type UnimplementedTableDifferServer ¶
type UnimplementedTableDifferServer struct { }
UnimplementedTableDifferServer must be embedded to have forward compatible implementations.
func (UnimplementedTableDifferServer) ShowHistory ¶
func (UnimplementedTableDifferServer) ShowHistory(context.Context, *ShowHistoryRequest) (*ShowHistoryResponse, error)
func (UnimplementedTableDifferServer) TableDiff ¶
func (UnimplementedTableDifferServer) TableDiff(context.Context, *TableDiffRequest) (*TableDiffResponse, error)
type UnsafeTableDifferServer ¶
type UnsafeTableDifferServer interface {
// contains filtered or unexported methods
}
UnsafeTableDifferServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TableDifferServer will result in compilation errors.