Documentation ¶
Index ¶
- Constants
- func RegisterEventingServer(s *grpc.Server, srv EventingServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetName() string
- func (m *Event) GetPayload() []byte
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) String() string
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type EventSource
- func (*EventSource) Descriptor() ([]byte, []int)
- func (m *EventSource) GetId() string
- func (m *EventSource) GetName() string
- func (m *EventSource) GetType() string
- func (m *EventSource) GetValue() []byte
- func (*EventSource) ProtoMessage()
- func (m *EventSource) Reset()
- func (m *EventSource) String() string
- func (m *EventSource) XXX_DiscardUnknown()
- func (m *EventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventSource) XXX_Merge(src proto.Message)
- func (m *EventSource) XXX_Size() int
- func (m *EventSource) XXX_Unmarshal(b []byte) error
- type EventingClient
- type EventingServer
- type Eventing_StartEventSourceClient
- type Eventing_StartEventSourceServer
- type ValidEventSource
- func (*ValidEventSource) Descriptor() ([]byte, []int)
- func (m *ValidEventSource) GetIsValid() bool
- func (m *ValidEventSource) GetReason() string
- func (*ValidEventSource) ProtoMessage()
- func (m *ValidEventSource) Reset()
- func (m *ValidEventSource) String() string
- func (m *ValidEventSource) XXX_DiscardUnknown()
- func (m *ValidEventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidEventSource) XXX_Merge(src proto.Message)
- func (m *ValidEventSource) XXX_Size() int
- func (m *ValidEventSource) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const (
// EventSourceDir
EventSourceDir = "../../../examples/event-sources"
)
Gateway constants
Variables ¶
This section is empty.
Functions ¶
func RegisterEventingServer ¶
func RegisterEventingServer(s *grpc.Server, srv EventingServer)
Types ¶
type Event ¶
type Event struct { // The event source name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The event payload. Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents an event
func (*Event) Descriptor ¶
func (*Event) GetPayload ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type EventSource ¶
type EventSource struct { // ID of the event source. internally generated. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The event source name. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The event source configuration value. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // Type of the event source Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents an event source
func (*EventSource) Descriptor ¶
func (*EventSource) Descriptor() ([]byte, []int)
func (*EventSource) GetId ¶
func (m *EventSource) GetId() string
func (*EventSource) GetName ¶
func (m *EventSource) GetName() string
func (*EventSource) GetType ¶ added in v0.13.0
func (m *EventSource) GetType() string
func (*EventSource) GetValue ¶ added in v0.13.0
func (m *EventSource) GetValue() []byte
func (*EventSource) ProtoMessage ¶
func (*EventSource) ProtoMessage()
func (*EventSource) Reset ¶
func (m *EventSource) Reset()
func (*EventSource) String ¶
func (m *EventSource) String() string
func (*EventSource) XXX_DiscardUnknown ¶
func (m *EventSource) XXX_DiscardUnknown()
func (*EventSource) XXX_Marshal ¶
func (m *EventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventSource) XXX_Merge ¶
func (m *EventSource) XXX_Merge(src proto.Message)
func (*EventSource) XXX_Size ¶
func (m *EventSource) XXX_Size() int
func (*EventSource) XXX_Unmarshal ¶
func (m *EventSource) XXX_Unmarshal(b []byte) error
type EventingClient ¶
type EventingClient interface { // StartEventSource starts an event source and returns stream of events. StartEventSource(ctx context.Context, in *EventSource, opts ...grpc.CallOption) (Eventing_StartEventSourceClient, error) // ValidateEventSource validates an event source. ValidateEventSource(ctx context.Context, in *EventSource, opts ...grpc.CallOption) (*ValidEventSource, error) }
EventingClient is the client API for Eventing service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEventingClient ¶
func NewEventingClient(cc *grpc.ClientConn) EventingClient
type EventingServer ¶
type EventingServer interface { // StartEventSource starts an event source and returns stream of events. StartEventSource(*EventSource, Eventing_StartEventSourceServer) error // ValidateEventSource validates an event source. ValidateEventSource(context.Context, *EventSource) (*ValidEventSource, error) }
EventingServer is the server API for Eventing service.
type Eventing_StartEventSourceClient ¶
type Eventing_StartEventSourceClient interface { Recv() (*Event, error) grpc.ClientStream }
type Eventing_StartEventSourceServer ¶
type Eventing_StartEventSourceServer interface { Send(*Event) error grpc.ServerStream }
type ValidEventSource ¶
type ValidEventSource struct { // whether event source is valid IsValid bool `protobuf:"varint,1,opt,name=isValid,proto3" json:"isValid,omitempty"` // reason if an event source is invalid Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
* Represents if an event source is valid or not
func (*ValidEventSource) Descriptor ¶
func (*ValidEventSource) Descriptor() ([]byte, []int)
func (*ValidEventSource) GetIsValid ¶
func (m *ValidEventSource) GetIsValid() bool
func (*ValidEventSource) GetReason ¶
func (m *ValidEventSource) GetReason() string
func (*ValidEventSource) ProtoMessage ¶
func (*ValidEventSource) ProtoMessage()
func (*ValidEventSource) Reset ¶
func (m *ValidEventSource) Reset()
func (*ValidEventSource) String ¶
func (m *ValidEventSource) String() string
func (*ValidEventSource) XXX_DiscardUnknown ¶
func (m *ValidEventSource) XXX_DiscardUnknown()
func (*ValidEventSource) XXX_Marshal ¶
func (m *ValidEventSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidEventSource) XXX_Merge ¶
func (m *ValidEventSource) XXX_Merge(src proto.Message)
func (*ValidEventSource) XXX_Size ¶
func (m *ValidEventSource) XXX_Size() int
func (*ValidEventSource) XXX_Unmarshal ¶
func (m *ValidEventSource) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.