Documentation ¶
Overview ¶
Package stategate is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CacheServiceClient) error
- func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CacheServiceServer) error
- func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)
- func RegisterEntityServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEntityServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EntityServiceClient) error
- func RegisterEntityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEntityServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EntityServiceServer) error
- func RegisterEntityServiceServer(s *grpc.Server, srv EntityServiceServer)
- func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
- func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
- func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
- func RegisterMutexServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMutexServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MutexServiceClient) error
- func RegisterMutexServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMutexServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MutexServiceServer) error
- func RegisterMutexServiceServer(s *grpc.Server, srv MutexServiceServer)
- func RegisterPeerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPeerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerServiceClient) error
- func RegisterPeerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPeerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerServiceServer) error
- func RegisterPeerServiceServer(s *grpc.Server, srv PeerServiceServer)
- type Cache
- func (*Cache) Descriptor() ([]byte, []int)deprecated
- func (x *Cache) GetDomain() string
- func (x *Cache) GetExp() *timestamp.Timestamp
- func (x *Cache) GetKey() string
- func (x *Cache) GetValue() *_struct.Value
- func (*Cache) ProtoMessage()
- func (x *Cache) ProtoReflect() protoreflect.Message
- func (x *Cache) Reset()
- func (x *Cache) String() string
- func (this *Cache) Validate() error
- type CacheRef
- func (*CacheRef) Descriptor() ([]byte, []int)deprecated
- func (x *CacheRef) GetDomain() string
- func (x *CacheRef) GetKey() string
- func (*CacheRef) ProtoMessage()
- func (x *CacheRef) ProtoReflect() protoreflect.Message
- func (x *CacheRef) Reset()
- func (x *CacheRef) String() string
- func (this *CacheRef) Validate() error
- type CacheServiceClient
- type CacheServiceServer
- type Entities
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)deprecated
- func (x *Entity) GetDomain() string
- func (x *Entity) GetKey() string
- func (x *Entity) GetType() string
- func (x *Entity) GetValues() *_struct.Struct
- func (*Entity) ProtoMessage()
- func (x *Entity) ProtoReflect() protoreflect.Message
- func (x *Entity) Reset()
- func (x *Entity) String() string
- func (this *Entity) Validate() error
- type EntityRef
- func (*EntityRef) Descriptor() ([]byte, []int)deprecated
- func (x *EntityRef) GetDomain() string
- func (x *EntityRef) GetKey() string
- func (x *EntityRef) GetType() string
- func (*EntityRef) ProtoMessage()
- func (x *EntityRef) ProtoReflect() protoreflect.Message
- func (x *EntityRef) Reset()
- func (x *EntityRef) String() string
- func (this *EntityRef) Validate() error
- type EntityServiceClient
- type EntityServiceServer
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetClaims() *_struct.Struct
- func (x *Event) GetEntity() *Entity
- func (x *Event) GetId() string
- func (x *Event) GetMethod() string
- func (x *Event) GetTime() int64
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (this *Event) Validate() error
- type EventRef
- func (*EventRef) Descriptor() ([]byte, []int)deprecated
- func (x *EventRef) GetDomain() string
- func (x *EventRef) GetId() string
- func (x *EventRef) GetKey() string
- func (x *EventRef) GetType() string
- func (*EventRef) ProtoMessage()
- func (x *EventRef) ProtoReflect() protoreflect.Message
- func (x *EventRef) Reset()
- func (x *EventRef) String() string
- func (this *EventRef) Validate() error
- type EventServiceClient
- type EventServiceServer
- type EventService_StreamClient
- type EventService_StreamServer
- type Events
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetBody() *_struct.Struct
- func (x *Message) GetChannel() string
- func (x *Message) GetDomain() string
- func (x *Message) GetType() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- func (this *Message) Validate() error
- type Mutex
- func (*Mutex) Descriptor() ([]byte, []int)deprecated
- func (x *Mutex) GetDomain() string
- func (x *Mutex) GetExp() *timestamp.Timestamp
- func (x *Mutex) GetKey() string
- func (*Mutex) ProtoMessage()
- func (x *Mutex) ProtoReflect() protoreflect.Message
- func (x *Mutex) Reset()
- func (x *Mutex) String() string
- func (this *Mutex) Validate() error
- type MutexRef
- func (*MutexRef) Descriptor() ([]byte, []int)deprecated
- func (x *MutexRef) GetDomain() string
- func (x *MutexRef) GetKey() string
- func (*MutexRef) ProtoMessage()
- func (x *MutexRef) ProtoReflect() protoreflect.Message
- func (x *MutexRef) Reset()
- func (x *MutexRef) String() string
- func (this *MutexRef) Validate() error
- type MutexServiceClient
- type MutexServiceServer
- type PeerMessage
- func (*PeerMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PeerMessage) GetBody() *_struct.Struct
- func (x *PeerMessage) GetChannel() string
- func (x *PeerMessage) GetClaims() *_struct.Struct
- func (x *PeerMessage) GetDomain() string
- func (x *PeerMessage) GetId() string
- func (x *PeerMessage) GetTime() int64
- func (x *PeerMessage) GetType() string
- func (*PeerMessage) ProtoMessage()
- func (x *PeerMessage) ProtoReflect() protoreflect.Message
- func (x *PeerMessage) Reset()
- func (x *PeerMessage) String() string
- func (this *PeerMessage) Validate() error
- type PeerServiceClient
- type PeerServiceServer
- type PeerService_StreamClient
- type PeerService_StreamServer
- type SearchEntityOpts
- func (*SearchEntityOpts) Descriptor() ([]byte, []int)deprecated
- func (x *SearchEntityOpts) GetDomain() string
- func (x *SearchEntityOpts) GetLimit() int32
- func (x *SearchEntityOpts) GetOffset() int32
- func (x *SearchEntityOpts) GetQueryString() string
- func (x *SearchEntityOpts) GetSort() *Sort
- func (x *SearchEntityOpts) GetType() string
- func (*SearchEntityOpts) ProtoMessage()
- func (x *SearchEntityOpts) ProtoReflect() protoreflect.Message
- func (x *SearchEntityOpts) Reset()
- func (x *SearchEntityOpts) String() string
- func (this *SearchEntityOpts) Validate() error
- type SearchEventOpts
- func (*SearchEventOpts) Descriptor() ([]byte, []int)deprecated
- func (x *SearchEventOpts) GetDomain() string
- func (x *SearchEventOpts) GetLimit() int32
- func (x *SearchEventOpts) GetMax() int64
- func (x *SearchEventOpts) GetMin() int64
- func (x *SearchEventOpts) GetOffset() int32
- func (x *SearchEventOpts) GetQueryString() string
- func (x *SearchEventOpts) GetSort() *Sort
- func (x *SearchEventOpts) GetType() string
- func (*SearchEventOpts) ProtoMessage()
- func (x *SearchEventOpts) ProtoReflect() protoreflect.Message
- func (x *SearchEventOpts) Reset()
- func (x *SearchEventOpts) String() string
- func (this *SearchEventOpts) Validate() error
- type Sort
- type StreamEventOpts
- func (*StreamEventOpts) Descriptor() ([]byte, []int)deprecated
- func (x *StreamEventOpts) GetConsumerGroup() string
- func (x *StreamEventOpts) GetDomain() string
- func (x *StreamEventOpts) GetType() string
- func (*StreamEventOpts) ProtoMessage()
- func (x *StreamEventOpts) ProtoReflect() protoreflect.Message
- func (x *StreamEventOpts) Reset()
- func (x *StreamEventOpts) String() string
- func (this *StreamEventOpts) Validate() error
- type StreamMessageOpts
- func (*StreamMessageOpts) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMessageOpts) GetChannel() string
- func (x *StreamMessageOpts) GetConsumerGroup() string
- func (x *StreamMessageOpts) GetDomain() string
- func (x *StreamMessageOpts) GetType() string
- func (*StreamMessageOpts) ProtoMessage()
- func (x *StreamMessageOpts) ProtoReflect() protoreflect.Message
- func (x *StreamMessageOpts) Reset()
- func (x *StreamMessageOpts) String() string
- func (this *StreamMessageOpts) Validate() error
- type UnimplementedCacheServiceServer
- type UnimplementedEntityServiceServer
- func (*UnimplementedEntityServiceServer) Del(context.Context, *EntityRef) (*empty.Empty, error)
- func (*UnimplementedEntityServiceServer) Edit(context.Context, *Entity) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Get(context.Context, *EntityRef) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Revert(context.Context, *EventRef) (*Entity, error)
- func (*UnimplementedEntityServiceServer) Search(context.Context, *SearchEntityOpts) (*Entities, error)
- func (*UnimplementedEntityServiceServer) Set(context.Context, *Entity) (*empty.Empty, error)
- type UnimplementedEventServiceServer
- type UnimplementedMutexServiceServer
- type UnimplementedPeerServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_schema_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCacheServiceHandler ¶
func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCacheServiceHandler registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCacheServiceHandlerClient ¶
func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CacheServiceClient) error
RegisterCacheServiceHandlerClient registers the http handlers for service CacheService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CacheServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CacheServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CacheServiceClient" to call the correct interceptors.
func RegisterCacheServiceHandlerFromEndpoint ¶
func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCacheServiceHandlerFromEndpoint is same as RegisterCacheServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCacheServiceHandlerServer ¶
func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CacheServiceServer) error
RegisterCacheServiceHandlerServer registers the http handlers for service CacheService to "mux". UnaryRPC :call CacheServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCacheServiceHandlerFromEndpoint instead.
func RegisterCacheServiceServer ¶
func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer)
func RegisterEntityServiceHandler ¶
func RegisterEntityServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEntityServiceHandler registers the http handlers for service EntityService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEntityServiceHandlerClient ¶
func RegisterEntityServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EntityServiceClient) error
RegisterEntityServiceHandlerClient registers the http handlers for service EntityService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EntityServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EntityServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EntityServiceClient" to call the correct interceptors.
func RegisterEntityServiceHandlerFromEndpoint ¶
func RegisterEntityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEntityServiceHandlerFromEndpoint is same as RegisterEntityServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEntityServiceHandlerServer ¶
func RegisterEntityServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EntityServiceServer) error
RegisterEntityServiceHandlerServer registers the http handlers for service EntityService to "mux". UnaryRPC :call EntityServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEntityServiceHandlerFromEndpoint instead.
func RegisterEntityServiceServer ¶
func RegisterEntityServiceServer(s *grpc.Server, srv EntityServiceServer)
func RegisterEventServiceHandler ¶
func RegisterEventServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEventServiceHandler registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventServiceHandlerClient ¶
func RegisterEventServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventServiceClient) error
RegisterEventServiceHandlerClient registers the http handlers for service EventService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventServiceClient" to call the correct interceptors.
func RegisterEventServiceHandlerFromEndpoint ¶
func RegisterEventServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventServiceHandlerFromEndpoint is same as RegisterEventServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventServiceHandlerServer ¶
func RegisterEventServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventServiceServer) error
RegisterEventServiceHandlerServer registers the http handlers for service EventService to "mux". UnaryRPC :call EventServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEventServiceHandlerFromEndpoint instead.
func RegisterEventServiceServer ¶
func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer)
func RegisterMutexServiceHandler ¶
func RegisterMutexServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMutexServiceHandler registers the http handlers for service MutexService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMutexServiceHandlerClient ¶
func RegisterMutexServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MutexServiceClient) error
RegisterMutexServiceHandlerClient registers the http handlers for service MutexService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MutexServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MutexServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MutexServiceClient" to call the correct interceptors.
func RegisterMutexServiceHandlerFromEndpoint ¶
func RegisterMutexServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMutexServiceHandlerFromEndpoint is same as RegisterMutexServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMutexServiceHandlerServer ¶
func RegisterMutexServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MutexServiceServer) error
RegisterMutexServiceHandlerServer registers the http handlers for service MutexService to "mux". UnaryRPC :call MutexServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMutexServiceHandlerFromEndpoint instead.
func RegisterMutexServiceServer ¶
func RegisterMutexServiceServer(s *grpc.Server, srv MutexServiceServer)
func RegisterPeerServiceHandler ¶
func RegisterPeerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPeerServiceHandler registers the http handlers for service PeerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPeerServiceHandlerClient ¶
func RegisterPeerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PeerServiceClient) error
RegisterPeerServiceHandlerClient registers the http handlers for service PeerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PeerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PeerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PeerServiceClient" to call the correct interceptors.
func RegisterPeerServiceHandlerFromEndpoint ¶
func RegisterPeerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPeerServiceHandlerFromEndpoint is same as RegisterPeerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPeerServiceHandlerServer ¶
func RegisterPeerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PeerServiceServer) error
RegisterPeerServiceHandlerServer registers the http handlers for service PeerService to "mux". UnaryRPC :call PeerServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPeerServiceHandlerFromEndpoint instead.
func RegisterPeerServiceServer ¶
func RegisterPeerServiceServer(s *grpc.Server, srv PeerServiceServer)
Types ¶
type Cache ¶
type Cache struct { // the cached value's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the cached value's key (unique within domain) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // the cached value's value to store Value *_struct.Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // exp is the time at which the cached value will expire // if exp is 0, the value will never expire Exp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=exp,proto3" json:"exp,omitempty"` // contains filtered or unexported fields }
Cache is a persisted value that will expire after a period of time. It is held in memory for maximum performance.
func (*Cache) Descriptor
deprecated
func (*Cache) ProtoMessage ¶
func (*Cache) ProtoMessage()
func (*Cache) ProtoReflect ¶
func (x *Cache) ProtoReflect() protoreflect.Message
type CacheRef ¶
type CacheRef struct { // the cached value's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // cached value's key (unique within domain) // must not be empty or contain spaces Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
CacheRef is a reference to a cached value
func (*CacheRef) Descriptor
deprecated
func (*CacheRef) ProtoMessage ¶
func (*CacheRef) ProtoMessage()
func (*CacheRef) ProtoReflect ¶
func (x *CacheRef) ProtoReflect() protoreflect.Message
type CacheServiceClient ¶
type CacheServiceClient interface { // Set sets a value in the cache Set(ctx context.Context, in *Cache, opts ...grpc.CallOption) (*empty.Empty, error) // Get gets a value from the cache Get(ctx context.Context, in *CacheRef, opts ...grpc.CallOption) (*Cache, error) // Del deletes a value from the cache Del(ctx context.Context, in *CacheRef, opts ...grpc.CallOption) (*empty.Empty, error) }
CacheServiceClient is the client API for CacheService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCacheServiceClient ¶
func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient
type CacheServiceServer ¶
type CacheServiceServer interface { // Set sets a value in the cache Set(context.Context, *Cache) (*empty.Empty, error) // Get gets a value from the cache Get(context.Context, *CacheRef) (*Cache, error) // Del deletes a value from the cache Del(context.Context, *CacheRef) (*empty.Empty, error) }
CacheServiceServer is the server API for CacheService service.
type Entities ¶
type Entities struct { Entities []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"` // contains filtered or unexported fields }
Entities is an array of Entity
func (*Entities) Descriptor
deprecated
func (*Entities) GetEntities ¶
func (*Entities) ProtoMessage ¶
func (*Entities) ProtoMessage()
func (*Entities) ProtoReflect ¶
func (x *Entities) ProtoReflect() protoreflect.Message
type Entity ¶
type Entity struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the entity's type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // the entity's key (unique within type). // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // the entity's values (k/v pairs) Values *_struct.Struct `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Entity represents a single record(k/v pairs) with a unique key with a given [type](https://en.wikipedia.org/wiki/Type_system), belonging to a particular [domain](https://en.wikipedia.org/wiki/Domain-driven_design) EventService clients should use the EntityService to persist & interact with the current state of an entity.
func (*Entity) Descriptor
deprecated
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) ProtoReflect ¶
func (x *Entity) ProtoReflect() protoreflect.Message
type EntityRef ¶
type EntityRef struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // entity type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // entity key (unique within type) // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
EntityRef is a reference to an existing entity
func (*EntityRef) Descriptor
deprecated
func (*EntityRef) ProtoMessage ¶
func (*EntityRef) ProtoMessage()
func (*EntityRef) ProtoReflect ¶
func (x *EntityRef) ProtoReflect() protoreflect.Message
type EntityServiceClient ¶
type EntityServiceClient interface { // Set sets the current state value of an entity, adds it to the event log, then broadcast the event to all interested consumers(EventService.Stream) Set(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*empty.Empty, error) // Edit overwrites the k/v pairs present in the entity request without replacing the entire entity. // It then adds the state change to the event log, then broadcast the event to all interested consumers(EventService.Stream) // Edit returns the current state of the Entity after the mutation. Edit(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) // Revert reverts an Entity to a previous version of itself by querying the event store. // Reverting an entity dispatches another event since it is a state change Revert(ctx context.Context, in *EventRef, opts ...grpc.CallOption) (*Entity, error) // Get gets an entity's current state Get(ctx context.Context, in *EntityRef, opts ...grpc.CallOption) (*Entity, error) // Del hard deletes an entity from current state store, adds it's state prior to deletion to the event log, then broadcast the event to all interested consumers(EventService.Stream) // an Entity may be recovered via querying the Event store for historical records of the deleted Entity. Del(ctx context.Context, in *EntityRef, opts ...grpc.CallOption) (*empty.Empty, error) // Search queries the current state of entities Search(ctx context.Context, in *SearchEntityOpts, opts ...grpc.CallOption) (*Entities, error) }
EntityServiceClient is the client API for EntityService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEntityServiceClient ¶
func NewEntityServiceClient(cc grpc.ClientConnInterface) EntityServiceClient
type EntityServiceServer ¶
type EntityServiceServer interface { // Set sets the current state value of an entity, adds it to the event log, then broadcast the event to all interested consumers(EventService.Stream) Set(context.Context, *Entity) (*empty.Empty, error) // Edit overwrites the k/v pairs present in the entity request without replacing the entire entity. // It then adds the state change to the event log, then broadcast the event to all interested consumers(EventService.Stream) // Edit returns the current state of the Entity after the mutation. Edit(context.Context, *Entity) (*Entity, error) // Revert reverts an Entity to a previous version of itself by querying the event store. // Reverting an entity dispatches another event since it is a state change Revert(context.Context, *EventRef) (*Entity, error) // Get gets an entity's current state Get(context.Context, *EntityRef) (*Entity, error) // Del hard deletes an entity from current state store, adds it's state prior to deletion to the event log, then broadcast the event to all interested consumers(EventService.Stream) // an Entity may be recovered via querying the Event store for historical records of the deleted Entity. Del(context.Context, *EntityRef) (*empty.Empty, error) // Search queries the current state of entities Search(context.Context, *SearchEntityOpts) (*Entities, error) }
EntityServiceServer is the server API for EntityService service.
type Event ¶
type Event struct { // identifies the event(uuid v4). Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // state of an Entity after it has been mutated Entity *Entity `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` // the invoked method that triggered the event Method string `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"` // the authentication claims of the event producer. Claims *_struct.Struct `protobuf:"bytes,3,opt,name=claims,proto3" json:"claims,omitempty"` // timestamp(ns) of when the event was received. Time int64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
Event is primitive that represents a single state change to an entity Events are persisted to history & broadcasted to interested consumers(Stream) any time an entity is created/modified/deleted Events are immutable after creation and may be searched. EventService client's may search events to query previous state of an entity(s)
func (*Event) Descriptor
deprecated
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventRef ¶
type EventRef struct { // the event's entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // event entity type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // event's entity's key (unique within type) // must not be empty or contain spaces Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // id is the event id. Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
EventRef holds options for reverting an entity to a previous version of itself
func (*EventRef) Descriptor
deprecated
func (*EventRef) ProtoMessage ¶
func (*EventRef) ProtoMessage()
func (*EventRef) ProtoReflect ¶
func (x *EventRef) ProtoReflect() protoreflect.Message
type EventServiceClient ¶
type EventServiceClient interface { // Stream creates an event stream/subscription to state changes to entities in real time. Glob matching is supported. Stream(ctx context.Context, in *StreamEventOpts, opts ...grpc.CallOption) (EventService_StreamClient, error) // Search queries historical events - every historical state change to an entity may be queried. Search(ctx context.Context, in *SearchEventOpts, opts ...grpc.CallOption) (*Events, error) // Get gets a single event Get(ctx context.Context, in *EventRef, opts ...grpc.CallOption) (*Event, error) }
EventServiceClient is the client API for EventService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventServiceClient ¶
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface { // Stream creates an event stream/subscription to state changes to entities in real time. Glob matching is supported. Stream(*StreamEventOpts, EventService_StreamServer) error // Search queries historical events - every historical state change to an entity may be queried. Search(context.Context, *SearchEventOpts) (*Events, error) // Get gets a single event Get(context.Context, *EventRef) (*Event, error) }
EventServiceServer is the server API for EventService service.
type EventService_StreamClient ¶
type EventService_StreamClient interface { Recv() (*Event, error) grpc.ClientStream }
type EventService_StreamServer ¶
type EventService_StreamServer interface { Send(*Event) error grpc.ServerStream }
type Events ¶
type Events struct { Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // contains filtered or unexported fields }
Events is an array of events
func (*Events) Descriptor
deprecated
func (*Events) ProtoMessage ¶
func (*Events) ProtoMessage()
func (*Events) ProtoReflect ¶
func (x *Events) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct { // the message's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) // must not be empty or contain spaces Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) // must not be empty or contain spaces Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // the body of the message(k/v values). Body *_struct.Struct `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Message is an arbitrary message to be delivered to a Peer Messages are NOT persisted and should only be used to communicate with other Peers
func (*Message) Descriptor
deprecated
func (*Message) GetChannel ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Mutex ¶
type Mutex struct { // the mutex's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // mutex key (unique within domain) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // exp is the time at which the mutex value will expire // if exp is 0, the mutex will never expire Exp *timestamp.Timestamp `protobuf:"bytes,4,opt,name=exp,proto3" json:"exp,omitempty"` // contains filtered or unexported fields }
Mutex is a distributed mutex for preventing data-races amongst peer services
func (*Mutex) Descriptor
deprecated
func (*Mutex) ProtoMessage ¶
func (*Mutex) ProtoMessage()
func (*Mutex) ProtoReflect ¶
func (x *Mutex) ProtoReflect() protoreflect.Message
type MutexRef ¶
type MutexRef struct { // the mutex's business domain(ex: accounting) Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // mutex key (unique within domain) Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
MutexRef is a reference to a distributed mutex
func (*MutexRef) Descriptor
deprecated
func (*MutexRef) ProtoMessage ¶
func (*MutexRef) ProtoMessage()
func (*MutexRef) ProtoReflect ¶
func (x *MutexRef) ProtoReflect() protoreflect.Message
type MutexServiceClient ¶
type MutexServiceClient interface { // Lock locks a value for a period of time if it is not locked already. // If it is already locked, an error will be returned // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Lock(ctx context.Context, in *Mutex, opts ...grpc.CallOption) (*empty.Empty, error) // Unlock unlocks the key(if it's currently locked) so that it may be locked again. // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Unlock(ctx context.Context, in *MutexRef, opts ...grpc.CallOption) (*empty.Empty, error) }
MutexServiceClient is the client API for MutexService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMutexServiceClient ¶
func NewMutexServiceClient(cc grpc.ClientConnInterface) MutexServiceClient
type MutexServiceServer ¶
type MutexServiceServer interface { // Lock locks a value for a period of time if it is not locked already. // If it is already locked, an error will be returned // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Lock(context.Context, *Mutex) (*empty.Empty, error) // Unlock unlocks the key(if it's currently locked) so that it may be locked again. // It is best practice for client's to call Unlock when the distributed lock operation is completed instead of relying on the TTL Unlock(context.Context, *MutexRef) (*empty.Empty, error) }
MutexServiceServer is the server API for MutexService service.
type PeerMessage ¶
type PeerMessage struct { // the unique id of the message Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // the message's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) // must not be empty or contain spaces Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) // must not be empty or contain spaces Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // the body of the message(k/v values). Body *_struct.Struct `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` // the authentication claims of the message producer. Claims *_struct.Struct `protobuf:"bytes,6,opt,name=claims,proto3" json:"claims,omitempty"` // timestamp(ns) of when the message was broadcasted. Time int64 `protobuf:"varint,7,opt,name=time,proto3" json:"time,omitempty"` // contains filtered or unexported fields }
PeerMessage is a message produced by a client to the PeerService PeerMessages are NOT persisted and should only be used to communicate with other Peers
func (*PeerMessage) Descriptor
deprecated
func (*PeerMessage) Descriptor() ([]byte, []int)
Deprecated: Use PeerMessage.ProtoReflect.Descriptor instead.
func (*PeerMessage) GetBody ¶
func (x *PeerMessage) GetBody() *_struct.Struct
func (*PeerMessage) GetChannel ¶
func (x *PeerMessage) GetChannel() string
func (*PeerMessage) GetClaims ¶
func (x *PeerMessage) GetClaims() *_struct.Struct
func (*PeerMessage) GetDomain ¶
func (x *PeerMessage) GetDomain() string
func (*PeerMessage) GetId ¶
func (x *PeerMessage) GetId() string
func (*PeerMessage) GetTime ¶
func (x *PeerMessage) GetTime() int64
func (*PeerMessage) GetType ¶
func (x *PeerMessage) GetType() string
func (*PeerMessage) ProtoMessage ¶
func (*PeerMessage) ProtoMessage()
func (*PeerMessage) ProtoReflect ¶
func (x *PeerMessage) ProtoReflect() protoreflect.Message
func (*PeerMessage) Reset ¶
func (x *PeerMessage) Reset()
func (*PeerMessage) String ¶
func (x *PeerMessage) String() string
func (*PeerMessage) Validate ¶
func (this *PeerMessage) Validate() error
type PeerServiceClient ¶
type PeerServiceClient interface { // Broadcast broadcasts a message to N subscribers(clients calling Stream) Broadcast(ctx context.Context, in *Message, opts ...grpc.CallOption) (*empty.Empty, error) // Stream consumes/streams messages from message producers(clients calling broadcast) Stream(ctx context.Context, in *StreamMessageOpts, opts ...grpc.CallOption) (PeerService_StreamClient, error) }
PeerServiceClient is the client API for PeerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPeerServiceClient ¶
func NewPeerServiceClient(cc grpc.ClientConnInterface) PeerServiceClient
type PeerServiceServer ¶
type PeerServiceServer interface { // Broadcast broadcasts a message to N subscribers(clients calling Stream) Broadcast(context.Context, *Message) (*empty.Empty, error) // Stream consumes/streams messages from message producers(clients calling broadcast) Stream(*StreamMessageOpts, PeerService_StreamServer) error }
PeerServiceServer is the server API for PeerService service.
type PeerService_StreamClient ¶
type PeerService_StreamClient interface { Recv() (*PeerMessage, error) grpc.ClientStream }
type PeerService_StreamServer ¶
type PeerService_StreamServer interface { Send(*PeerMessage) error grpc.ServerStream }
type SearchEntityOpts ¶
type SearchEntityOpts struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // State type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // json string to filter records that have values match k/v pairs ex: { "message": "hello world" } // please note that dot notation may be used to access nested fields QueryString string `protobuf:"bytes,3,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"` // limit number of returned values Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // offset returned events(pagination) Offset int32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` // sort sorts the returned entities by a specified field Sort *Sort `protobuf:"bytes,9,opt,name=sort,proto3" json:"sort,omitempty"` // contains filtered or unexported fields }
SearchEntityOpts are options when querying the current values of entities. If historical values are needed, SearchEvents should be used
func (*SearchEntityOpts) Descriptor
deprecated
func (*SearchEntityOpts) Descriptor() ([]byte, []int)
Deprecated: Use SearchEntityOpts.ProtoReflect.Descriptor instead.
func (*SearchEntityOpts) GetDomain ¶
func (x *SearchEntityOpts) GetDomain() string
func (*SearchEntityOpts) GetLimit ¶
func (x *SearchEntityOpts) GetLimit() int32
func (*SearchEntityOpts) GetOffset ¶
func (x *SearchEntityOpts) GetOffset() int32
func (*SearchEntityOpts) GetQueryString ¶
func (x *SearchEntityOpts) GetQueryString() string
func (*SearchEntityOpts) GetSort ¶
func (x *SearchEntityOpts) GetSort() *Sort
func (*SearchEntityOpts) GetType ¶
func (x *SearchEntityOpts) GetType() string
func (*SearchEntityOpts) ProtoMessage ¶
func (*SearchEntityOpts) ProtoMessage()
func (*SearchEntityOpts) ProtoReflect ¶
func (x *SearchEntityOpts) ProtoReflect() protoreflect.Message
func (*SearchEntityOpts) Reset ¶
func (x *SearchEntityOpts) Reset()
func (*SearchEntityOpts) String ¶
func (x *SearchEntityOpts) String() string
func (*SearchEntityOpts) Validate ¶
func (this *SearchEntityOpts) Validate() error
type SearchEventOpts ¶
type SearchEventOpts struct { // the entity's business domain(ex: accounting) // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // entity's type (ex: user) // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // json string to filter events based with values that match k/v pairs ex: { "entity.values.message": "hello world" }. // please note that dot notation may be used to access nested fields QueryString string `protobuf:"bytes,4,opt,name=query_string,json=queryString,proto3" json:"query_string,omitempty"` // only return events that occurred after specified min timestamp Min int64 `protobuf:"varint,5,opt,name=min,proto3" json:"min,omitempty"` // only return events that occurred before specified max timestamp Max int64 `protobuf:"varint,6,opt,name=max,proto3" json:"max,omitempty"` // limit number of returned values Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"` // offset returned events(pagination) Offset int32 `protobuf:"varint,8,opt,name=offset,proto3" json:"offset,omitempty"` // sort sorts the returned entities by a specified field Sort *Sort `protobuf:"bytes,9,opt,name=sort,proto3" json:"sort,omitempty"` // contains filtered or unexported fields }
SearchEventOpts are options when querying historical events emitted from mutations made from State mutations
func (*SearchEventOpts) Descriptor
deprecated
func (*SearchEventOpts) Descriptor() ([]byte, []int)
Deprecated: Use SearchEventOpts.ProtoReflect.Descriptor instead.
func (*SearchEventOpts) GetDomain ¶
func (x *SearchEventOpts) GetDomain() string
func (*SearchEventOpts) GetLimit ¶
func (x *SearchEventOpts) GetLimit() int32
func (*SearchEventOpts) GetMax ¶
func (x *SearchEventOpts) GetMax() int64
func (*SearchEventOpts) GetMin ¶
func (x *SearchEventOpts) GetMin() int64
func (*SearchEventOpts) GetOffset ¶
func (x *SearchEventOpts) GetOffset() int32
func (*SearchEventOpts) GetQueryString ¶
func (x *SearchEventOpts) GetQueryString() string
func (*SearchEventOpts) GetSort ¶
func (x *SearchEventOpts) GetSort() *Sort
func (*SearchEventOpts) GetType ¶
func (x *SearchEventOpts) GetType() string
func (*SearchEventOpts) ProtoMessage ¶
func (*SearchEventOpts) ProtoMessage()
func (*SearchEventOpts) ProtoReflect ¶
func (x *SearchEventOpts) ProtoReflect() protoreflect.Message
func (*SearchEventOpts) Reset ¶
func (x *SearchEventOpts) Reset()
func (*SearchEventOpts) String ¶
func (x *SearchEventOpts) String() string
func (*SearchEventOpts) Validate ¶
func (this *SearchEventOpts) Validate() error
type Sort ¶
type Sort struct { // field is a field to sort the array by // please note that dot notation may be used to access nested fields Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // reverse reverses the direction of the sort Reverse bool `protobuf:"varint,2,opt,name=reverse,proto3" json:"reverse,omitempty"` // contains filtered or unexported fields }
Sort is a primitive used to sort an array
func (*Sort) Descriptor
deprecated
func (*Sort) GetReverse ¶
func (*Sort) ProtoMessage ¶
func (*Sort) ProtoMessage()
func (*Sort) ProtoReflect ¶
func (x *Sort) ProtoReflect() protoreflect.Message
type StreamEventOpts ¶
type StreamEventOpts struct { // the domain of the entity (ex: acme) that triggered the event // * indicates any domain // must not be empty or contain spaces Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the type of the entity (ex: user) that triggered the event // * indicates any type // must not be empty or contain spaces Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // consumer_group ConsumerGroup string `protobuf:"bytes,3,opt,name=consumer_group,json=consumerGroup,proto3" json:"consumer_group,omitempty"` // contains filtered or unexported fields }
StreamEventOpts are options for consumers looking to stream events. Events are automatically emitted from mutations made from State mutations within the EntityService
func (*StreamEventOpts) Descriptor
deprecated
func (*StreamEventOpts) Descriptor() ([]byte, []int)
Deprecated: Use StreamEventOpts.ProtoReflect.Descriptor instead.
func (*StreamEventOpts) GetConsumerGroup ¶ added in v0.13.5
func (x *StreamEventOpts) GetConsumerGroup() string
func (*StreamEventOpts) GetDomain ¶
func (x *StreamEventOpts) GetDomain() string
func (*StreamEventOpts) GetType ¶
func (x *StreamEventOpts) GetType() string
func (*StreamEventOpts) ProtoMessage ¶
func (*StreamEventOpts) ProtoMessage()
func (*StreamEventOpts) ProtoReflect ¶
func (x *StreamEventOpts) ProtoReflect() protoreflect.Message
func (*StreamEventOpts) Reset ¶
func (x *StreamEventOpts) Reset()
func (*StreamEventOpts) String ¶
func (x *StreamEventOpts) String() string
func (*StreamEventOpts) Validate ¶
func (this *StreamEventOpts) Validate() error
type StreamMessageOpts ¶
type StreamMessageOpts struct { // the message's business domain(ex: accounting) to subscribe to // must not be empty or contain spaces // * indicates any domain Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // the message's channel(ex: general) to subscribe to // must not be empty or contain spaces // * indicates any channel Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // message's type (ex: comment) to subscribe to // must not be empty or contain spaces // * indicates any type Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // consumer_group ConsumerGroup string `protobuf:"bytes,4,opt,name=consumer_group,json=consumerGroup,proto3" json:"consumer_group,omitempty"` // contains filtered or unexported fields }
StreamMessageOpts holds options for streaming messages produced by Peers
func (*StreamMessageOpts) Descriptor
deprecated
func (*StreamMessageOpts) Descriptor() ([]byte, []int)
Deprecated: Use StreamMessageOpts.ProtoReflect.Descriptor instead.
func (*StreamMessageOpts) GetChannel ¶
func (x *StreamMessageOpts) GetChannel() string
func (*StreamMessageOpts) GetConsumerGroup ¶ added in v0.13.5
func (x *StreamMessageOpts) GetConsumerGroup() string
func (*StreamMessageOpts) GetDomain ¶
func (x *StreamMessageOpts) GetDomain() string
func (*StreamMessageOpts) GetType ¶
func (x *StreamMessageOpts) GetType() string
func (*StreamMessageOpts) ProtoMessage ¶
func (*StreamMessageOpts) ProtoMessage()
func (*StreamMessageOpts) ProtoReflect ¶
func (x *StreamMessageOpts) ProtoReflect() protoreflect.Message
func (*StreamMessageOpts) Reset ¶
func (x *StreamMessageOpts) Reset()
func (*StreamMessageOpts) String ¶
func (x *StreamMessageOpts) String() string
func (*StreamMessageOpts) Validate ¶
func (this *StreamMessageOpts) Validate() error
type UnimplementedCacheServiceServer ¶
type UnimplementedCacheServiceServer struct { }
UnimplementedCacheServiceServer can be embedded to have forward compatible implementations.
type UnimplementedEntityServiceServer ¶
type UnimplementedEntityServiceServer struct { }
UnimplementedEntityServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEntityServiceServer) Search ¶
func (*UnimplementedEntityServiceServer) Search(context.Context, *SearchEntityOpts) (*Entities, error)
type UnimplementedEventServiceServer ¶
type UnimplementedEventServiceServer struct { }
UnimplementedEventServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEventServiceServer) Search ¶
func (*UnimplementedEventServiceServer) Search(context.Context, *SearchEventOpts) (*Events, error)
func (*UnimplementedEventServiceServer) Stream ¶
func (*UnimplementedEventServiceServer) Stream(*StreamEventOpts, EventService_StreamServer) error
type UnimplementedMutexServiceServer ¶
type UnimplementedMutexServiceServer struct { }
UnimplementedMutexServiceServer can be embedded to have forward compatible implementations.
type UnimplementedPeerServiceServer ¶
type UnimplementedPeerServiceServer struct { }
UnimplementedPeerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPeerServiceServer) Stream ¶
func (*UnimplementedPeerServiceServer) Stream(*StreamMessageOpts, PeerService_StreamServer) error