Documentation
¶
Index ¶
- Variables
- type IdempotencyKey
- func (x *IdempotencyKey) ClearIdempotencyKey()
- func (x *IdempotencyKey) ClearTimestamp()
- func (x *IdempotencyKey) GetIdempotencyKey() string
- func (x *IdempotencyKey) GetTimestamp() *timestamppb.Timestamp
- func (x *IdempotencyKey) HasIdempotencyKey() bool
- func (x *IdempotencyKey) HasTimestamp() bool
- func (*IdempotencyKey) ProtoMessage()
- func (x *IdempotencyKey) ProtoReflect() protoreflect.Message
- func (x *IdempotencyKey) Reset()
- func (x *IdempotencyKey) SetIdempotencyKey(v string)
- func (x *IdempotencyKey) SetTimestamp(v *timestamppb.Timestamp)
- func (x *IdempotencyKey) String() string
- type IdempotencyKey_builder
Constants ¶
This section is empty.
Variables ¶
var File_fjarm_idempotency_v1_idempotency_key_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type IdempotencyKey ¶
type IdempotencyKey struct {
// A user-specified, unique identifier that can be used to retry eligible requests.
IdempotencyKey *string `protobuf:"bytes,1,opt,name=idempotency_key,json=idempotencyKey,proto3,oneof" json:"idempotency_key,omitempty"`
// A point in time independent of any time zone or calendar represented as seconds and fractions of
// seconds at nanosecond resolution in UTC Epoch time.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
SEE: https://google.aip.dev/155 AIP-155 recommends having a `request_id` field in each request message. The value can be used to de-duplicate requests, especially those that fail due to transient or retryable errors like `UNAVAILABLE`. For retried mutation RPCs, the originally processed result can be immediately returned. This avoids expensive database operations AND ensures the same mutation returns the same result.
IdempotencyKey describes the details needed to ensure that a repeated or retried mutation RPC does is processed exactly once.
If the request fails (because of network or other retry-able errors), a client can retry a request. The server can detect duplicates and ensure the request is only processed once.
The field is added to each request body to make requirement enforcement more explicit. An interceptor then reads it and sets the value as a request header.
func (*IdempotencyKey) ClearIdempotencyKey ¶
func (x *IdempotencyKey) ClearIdempotencyKey()
func (*IdempotencyKey) ClearTimestamp ¶
func (x *IdempotencyKey) ClearTimestamp()
func (*IdempotencyKey) GetIdempotencyKey ¶
func (x *IdempotencyKey) GetIdempotencyKey() string
func (*IdempotencyKey) GetTimestamp ¶
func (x *IdempotencyKey) GetTimestamp() *timestamppb.Timestamp
func (*IdempotencyKey) HasIdempotencyKey ¶
func (x *IdempotencyKey) HasIdempotencyKey() bool
func (*IdempotencyKey) HasTimestamp ¶
func (x *IdempotencyKey) HasTimestamp() bool
func (*IdempotencyKey) ProtoMessage ¶
func (*IdempotencyKey) ProtoMessage()
func (*IdempotencyKey) ProtoReflect ¶
func (x *IdempotencyKey) ProtoReflect() protoreflect.Message
func (*IdempotencyKey) Reset ¶
func (x *IdempotencyKey) Reset()
func (*IdempotencyKey) SetIdempotencyKey ¶
func (x *IdempotencyKey) SetIdempotencyKey(v string)
func (*IdempotencyKey) SetTimestamp ¶
func (x *IdempotencyKey) SetTimestamp(v *timestamppb.Timestamp)
func (*IdempotencyKey) String ¶
func (x *IdempotencyKey) String() string
type IdempotencyKey_builder ¶
type IdempotencyKey_builder struct {
// A user-specified, unique identifier that can be used to retry eligible requests.
IdempotencyKey *string
// A point in time independent of any time zone or calendar represented as seconds and fractions of
// seconds at nanosecond resolution in UTC Epoch time.
Timestamp *timestamppb.Timestamp
// contains filtered or unexported fields
}
func (IdempotencyKey_builder) Build ¶
func (b0 IdempotencyKey_builder) Build() *IdempotencyKey
Source Files
¶
- idempotency_key.pb.go