pb

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FutureStatus_name = map[int32]string{
		0: "INVALID",
		1: "PENDING",
		2: "RESOLVED",
		3: "REJECTED",
	}
	FutureStatus_value = map[string]int32{
		"INVALID":  0,
		"PENDING":  1,
		"RESOLVED": 2,
		"REJECTED": 3,
	}
)

Enum value maps for FutureStatus.

View Source
var File_evently_proto protoreflect.FileDescriptor
View Source
var File_evently_server_proto protoreflect.FileDescriptor
View Source
var Future_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "offloaded.evently.Future",
	HandlerType: (*FutureServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Future_Create_Handler,
		},
		{
			MethodName: "Resolve",
			Handler:    _Future_Resolve_Handler,
		},
		{
			MethodName: "Reject",
			Handler:    _Future_Reject_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Future_Delete_Handler,
		},
		{
			MethodName: "Await",
			Handler:    _Future_Await_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Future_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "evently.proto",
}

Future_ServiceDesc is the grpc.ServiceDesc for Future service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterFutureServer

func RegisterFutureServer(s grpc.ServiceRegistrar, srv FutureServer)

Types

type AwaitResponse added in v0.1.1

type AwaitResponse struct {

	// Types that are assignable to Result:
	//
	//	*AwaitResponse_Resolved
	//	*AwaitResponse_Rejected
	Result isAwaitResponse_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

func (*AwaitResponse) Descriptor deprecated added in v0.1.1

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

Deprecated: Use AwaitResponse.ProtoReflect.Descriptor instead.

func (*AwaitResponse) GetRejected added in v0.1.1

func (x *AwaitResponse) GetRejected() *Error

func (*AwaitResponse) GetResolved added in v0.1.1

func (x *AwaitResponse) GetResolved() *empty.Empty

func (*AwaitResponse) GetResult added in v0.1.1

func (m *AwaitResponse) GetResult() isAwaitResponse_Result

func (*AwaitResponse) ProtoMessage added in v0.1.1

func (*AwaitResponse) ProtoMessage()

func (*AwaitResponse) ProtoReflect added in v0.1.1

func (x *AwaitResponse) ProtoReflect() protoreflect.Message

func (*AwaitResponse) Reset added in v0.1.1

func (x *AwaitResponse) Reset()

func (*AwaitResponse) String added in v0.1.1

func (x *AwaitResponse) String() string

type AwaitResponse_Rejected added in v0.1.1

type AwaitResponse_Rejected struct {
	Rejected *Error `protobuf:"bytes,2,opt,name=rejected,proto3,oneof"`
}

type AwaitResponse_Resolved added in v0.1.1

type AwaitResponse_Resolved struct {
	Resolved *empty.Empty `protobuf:"bytes,1,opt,name=resolved,proto3,oneof"`
}

type Error

type Error struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type FutureClient

type FutureClient interface {
	// Create creates a new future, returning a token that can be used to
	// indentify the future in subsequent calls.
	Create(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.BytesValue, error)
	// Resolve resolves the future.
	Resolve(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*empty.Empty, error)
	// Reject rejects the future with an error message.
	Reject(ctx context.Context, in *RejectRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Delete deletes the future.
	Delete(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*empty.Empty, error)
	// Await blocks until the future is resolved or rejected.
	Await(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*AwaitResponse, error)
	// Status returns the status of the future (without blocking).
	Status(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*StatusResponse, error)
}

FutureClient is the client API for Future 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 NewFutureClient

func NewFutureClient(cc grpc.ClientConnInterface) FutureClient

type FutureServer

type FutureServer interface {
	// Create creates a new future, returning a token that can be used to
	// indentify the future in subsequent calls.
	Create(context.Context, *empty.Empty) (*wrappers.BytesValue, error)
	// Resolve resolves the future.
	Resolve(context.Context, *wrappers.BytesValue) (*empty.Empty, error)
	// Reject rejects the future with an error message.
	Reject(context.Context, *RejectRequest) (*empty.Empty, error)
	// Delete deletes the future.
	Delete(context.Context, *wrappers.BytesValue) (*empty.Empty, error)
	// Await blocks until the future is resolved or rejected.
	Await(context.Context, *wrappers.BytesValue) (*AwaitResponse, error)
	// Status returns the status of the future (without blocking).
	Status(context.Context, *wrappers.BytesValue) (*StatusResponse, error)
	// contains filtered or unexported methods
}

FutureServer is the server API for Future service. All implementations must embed UnimplementedFutureServer for forward compatibility

type FutureStatus added in v0.1.2

type FutureStatus int32
const (
	FutureStatus_INVALID  FutureStatus = 0
	FutureStatus_PENDING  FutureStatus = 1
	FutureStatus_RESOLVED FutureStatus = 2
	FutureStatus_REJECTED FutureStatus = 3
)

func (FutureStatus) Descriptor added in v0.1.2

func (FutureStatus) Enum added in v0.1.2

func (x FutureStatus) Enum() *FutureStatus

func (FutureStatus) EnumDescriptor deprecated added in v0.1.2

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

Deprecated: Use FutureStatus.Descriptor instead.

func (FutureStatus) Number added in v0.1.2

func (FutureStatus) String added in v0.1.2

func (x FutureStatus) String() string

func (FutureStatus) Type added in v0.1.2

type RejectRequest

type RejectRequest struct {
	Id     []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Reason *Error `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*RejectRequest) Descriptor deprecated

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

Deprecated: Use RejectRequest.ProtoReflect.Descriptor instead.

func (*RejectRequest) GetId

func (x *RejectRequest) GetId() []byte

func (*RejectRequest) GetReason

func (x *RejectRequest) GetReason() *Error

func (*RejectRequest) ProtoMessage

func (*RejectRequest) ProtoMessage()

func (*RejectRequest) ProtoReflect

func (x *RejectRequest) ProtoReflect() protoreflect.Message

func (*RejectRequest) Reset

func (x *RejectRequest) Reset()

func (*RejectRequest) String

func (x *RejectRequest) String() string

type StatusResponse added in v0.1.1

type StatusResponse struct {
	Status FutureStatus `protobuf:"varint,1,opt,name=status,proto3,enum=offloaded.evently.FutureStatus" json:"status,omitempty"`
	Error  *Error       `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated added in v0.1.1

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetError added in v0.1.1

func (x *StatusResponse) GetError() *Error

func (*StatusResponse) GetStatus added in v0.1.1

func (x *StatusResponse) GetStatus() FutureStatus

func (*StatusResponse) ProtoMessage added in v0.1.1

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect added in v0.1.1

func (x *StatusResponse) ProtoReflect() protoreflect.Message

func (*StatusResponse) Reset added in v0.1.1

func (x *StatusResponse) Reset()

func (*StatusResponse) String added in v0.1.1

func (x *StatusResponse) String() string

type StoredFuture

type StoredFuture struct {
	Id      []byte               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Created *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
	Status  FutureStatus         `protobuf:"varint,3,opt,name=status,proto3,enum=offloaded.evently.FutureStatus" json:"status,omitempty"`
	Reason  *Error               `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*StoredFuture) Descriptor deprecated

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

Deprecated: Use StoredFuture.ProtoReflect.Descriptor instead.

func (*StoredFuture) GetCreated

func (x *StoredFuture) GetCreated() *timestamp.Timestamp

func (*StoredFuture) GetId

func (x *StoredFuture) GetId() []byte

func (*StoredFuture) GetReason

func (x *StoredFuture) GetReason() *Error

func (*StoredFuture) GetStatus

func (x *StoredFuture) GetStatus() FutureStatus

func (*StoredFuture) ProtoMessage

func (*StoredFuture) ProtoMessage()

func (*StoredFuture) ProtoReflect

func (x *StoredFuture) ProtoReflect() protoreflect.Message

func (*StoredFuture) Reset

func (x *StoredFuture) Reset()

func (*StoredFuture) String

func (x *StoredFuture) String() string

type UnimplementedFutureServer

type UnimplementedFutureServer struct {
}

UnimplementedFutureServer must be embedded to have forward compatible implementations.

func (UnimplementedFutureServer) Await

func (UnimplementedFutureServer) Create

func (UnimplementedFutureServer) Delete

func (UnimplementedFutureServer) Reject

func (UnimplementedFutureServer) Resolve

func (UnimplementedFutureServer) Status added in v0.1.1

type UnsafeFutureServer

type UnsafeFutureServer interface {
	// contains filtered or unexported methods
}

UnsafeFutureServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FutureServer will result in compilation errors.

Jump to

Keyboard shortcuts

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