generic

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

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) Descriptor() ([]byte, []int)

func (*Event) GetName

func (m *Event) GetName() string

func (*Event) GetPayload

func (m *Event) GetPayload() []byte

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type EventListener

type EventListener struct {
	EventSourceName    string
	EventName          string
	GenericEventSource v1alpha1.GenericEventSource
	Metrics            *metrics.Metrics
	// contains filtered or unexported fields
}

EventListener implements Eventing for generic event source

func (*EventListener) GetEventName

func (el *EventListener) GetEventName() string

GetEventName returns name of event

func (*EventListener) GetEventSourceName

func (el *EventListener) GetEventSourceName() string

GetEventSourceName returns name of event source

func (*EventListener) GetEventSourceType

func (el *EventListener) GetEventSourceType() apicommon.EventSourceType

GetEventSourceType return type of event server

func (*EventListener) StartListening

func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byte, ...eventsourcecommon.Option) error) error

StartListening listens to generic events

func (*EventListener) ValidateEventSource

func (el *EventListener) ValidateEventSource(ctx context.Context) error

type EventSource

type EventSource struct {
	// The event source name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The event source configuration value.
	Config               []byte   `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EventSource) Descriptor

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

func (*EventSource) GetConfig

func (m *EventSource) GetConfig() []byte

func (*EventSource) GetName

func (m *EventSource) GetName() string

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(ctx context.Context, in *EventSource, opts ...grpc.CallOption) (Eventing_StartEventSourceClient, 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.ClientConnInterface) EventingClient

type EventingServer

type EventingServer interface {
	StartEventSource(*EventSource, Eventing_StartEventSourceServer) 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 UnimplementedEventingServer

type UnimplementedEventingServer struct {
}

UnimplementedEventingServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventingServer) StartEventSource

Jump to

Keyboard shortcuts

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