source

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 16 Imported by: 5

Documentation

Index

Constants

View Source
const (
	Source_Stream_FullMethodName                = "/source.Source/Stream"
	Source_HandleExternalRequest_FullMethodName = "/source.Source/HandleExternalRequest"
	Source_Metadata_FullMethodName              = "/source.Source/Metadata"
)
View Source
const ProtocolVersion = 3

ProtocolVersion is the version that must match between Botkube core and Botkube plugins. This should be bumped whenever a change happens in one or the other that makes it so that they can't safely communicate. This could be adding a new interface value, it could be how helper/schema computes diffs, etc.

NOTE: In the future we can consider using VersionedPlugins. These can be used to negotiate a compatible version between client and server. If this is set, Handshake.ProtocolVersion is not required.

Variables

View Source
var File_source_proto protoreflect.FileDescriptor
View Source
var Source_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "source.Source",
	HandlerType: (*SourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HandleExternalRequest",
			Handler:    _Source_HandleExternalRequest_Handler,
		},
		{
			MethodName: "Metadata",
			Handler:    _Source_Metadata_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Source_Stream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "source.proto",
}

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

Functions

func NewLogger added in v1.0.1

func NewLogger() logrus.FieldLogger

NewLogger returns a new logger used internally. We should replace it in the near future, as we shouldn't be so opinionated.

func RegisterSourceServer

func RegisterSourceServer(s grpc.ServiceRegistrar, srv SourceServer)

func Serve

func Serve(p map[string]plugin.Plugin)

Serve serves given plugins.

Types

type CommonSourceContext added in v1.4.0

type CommonSourceContext struct {
	// IsInteractivitySupported is set to true only if a communication platform supports interactive Messages.
	IsInteractivitySupported bool

	// ClusterName is the name of the underlying Kubernetes cluster which is provided by end user.
	ClusterName string

	// SourceName is the name of the source plugin configuration.
	SourceName string

	IncomingWebhook IncomingWebhookDetailsContext
}

CommonSourceContext holds common source context.

type Config

type Config struct {

	// RawYAML contains the Source configuration in YAML definitions.
	RawYAML []byte `protobuf:"bytes,1,opt,name=rawYAML,proto3" json:"rawYAML,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetRawYAML

func (x *Config) GetRawYAML() []byte

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Dependency added in v0.18.0

type Dependency struct {

	// urls is the map of URL of the dependency. The key is in format of "os/arch", such as "linux/amd64".
	Urls map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Dependency) Descriptor deprecated added in v0.18.0

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

Deprecated: Use Dependency.ProtoReflect.Descriptor instead.

func (*Dependency) GetUrls added in v0.18.0

func (x *Dependency) GetUrls() map[string]string

func (*Dependency) ProtoMessage added in v0.18.0

func (*Dependency) ProtoMessage()

func (*Dependency) ProtoReflect added in v0.18.0

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

func (*Dependency) Reset added in v0.18.0

func (x *Dependency) Reset()

func (*Dependency) SetUrls added in v0.18.0

func (d *Dependency) SetUrls(in map[string]string)

SetUrls sets the urls map for the dependency.

This method is needed because of current Go limitation: > The Go compiler does not support accessing a struct field x.f where x is of type parameter type even if all types in the type parameter's type set have a field f. We may remove this restriction in a future release. See https://go.dev/doc/go1.18 and https://github.com/golang/go/issues/48522

func (*Dependency) String added in v0.18.0

func (x *Dependency) String() string

type Event added in v1.0.0

type Event struct {
	Message         api.Message
	RawObject       any
	AnalyticsLabels map[string]interface{}
}

type ExternalRequest added in v1.4.0

type ExternalRequest struct {

	// Payload is a payload of a external request.
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Config is Source configuration specified by users.
	Config *Config `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// context holds context for external request.
	Context *ExternalRequestContext `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalRequest) Descriptor deprecated added in v1.4.0

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

Deprecated: Use ExternalRequest.ProtoReflect.Descriptor instead.

func (*ExternalRequest) GetConfig added in v1.4.0

func (x *ExternalRequest) GetConfig() *Config

func (*ExternalRequest) GetContext added in v1.4.0

func (x *ExternalRequest) GetContext() *ExternalRequestContext

func (*ExternalRequest) GetPayload added in v1.4.0

func (x *ExternalRequest) GetPayload() []byte

func (*ExternalRequest) ProtoMessage added in v1.4.0

func (*ExternalRequest) ProtoMessage()

func (*ExternalRequest) ProtoReflect added in v1.4.0

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

func (*ExternalRequest) Reset added in v1.4.0

func (x *ExternalRequest) Reset()

func (*ExternalRequest) String added in v1.4.0

func (x *ExternalRequest) String() string

type ExternalRequestContext added in v1.4.0

type ExternalRequestContext struct {
	SourceContext *SourceContext `protobuf:"bytes,1,opt,name=sourceContext,proto3" json:"sourceContext,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalRequestContext) Descriptor deprecated added in v1.4.0

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

Deprecated: Use ExternalRequestContext.ProtoReflect.Descriptor instead.

func (*ExternalRequestContext) GetSourceContext added in v1.4.0

func (x *ExternalRequestContext) GetSourceContext() *SourceContext

func (*ExternalRequestContext) ProtoMessage added in v1.4.0

func (*ExternalRequestContext) ProtoMessage()

func (*ExternalRequestContext) ProtoReflect added in v1.4.0

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

func (*ExternalRequestContext) Reset added in v1.4.0

func (x *ExternalRequestContext) Reset()

func (*ExternalRequestContext) String added in v1.4.0

func (x *ExternalRequestContext) String() string

type ExternalRequestInput added in v1.4.0

type ExternalRequestInput struct {
	// Payload is the payload of the incoming webhook.
	Payload []byte

	// Config is Source configuration specified by users.
	Config *Config

	// Context holds single dispatch context.
	Context ExternalRequestInputContext
}

ExternalRequestInput holds the input of the HandleExternalRequest function.

type ExternalRequestInputContext added in v1.4.0

type ExternalRequestInputContext struct {
	CommonSourceContext
}

ExternalRequestInputContext holds single ex context.

type ExternalRequestMetadata added in v1.4.0

type ExternalRequestMetadata struct {

	// payload is a payload of a external request.
	Payload *ExternalRequestPayloadMetadata `protobuf:"bytes,1,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalRequestMetadata) Descriptor deprecated added in v1.4.0

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

Deprecated: Use ExternalRequestMetadata.ProtoReflect.Descriptor instead.

func (*ExternalRequestMetadata) GetPayload added in v1.4.0

func (*ExternalRequestMetadata) ProtoMessage added in v1.4.0

func (*ExternalRequestMetadata) ProtoMessage()

func (*ExternalRequestMetadata) ProtoReflect added in v1.4.0

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

func (*ExternalRequestMetadata) Reset added in v1.4.0

func (x *ExternalRequestMetadata) Reset()

func (*ExternalRequestMetadata) String added in v1.4.0

func (x *ExternalRequestMetadata) String() string

type ExternalRequestOutput added in v1.4.0

type ExternalRequestOutput struct {
	// Event represents the streamed events with message, raw object, and analytics data. It is from the start of plugin consumption.
	// You can construct a complex message.data or just use one of our helper functions:
	//   - api.NewCodeBlockMessage("body", true)
	//   - api.NewPlaintextMessage("body", true)
	Event Event
}

ExternalRequestOutput holds the output of the Stream function.

type ExternalRequestPayloadMetadata added in v1.4.0

type ExternalRequestPayloadMetadata struct {

	// json_schema is a JSON schema of a given incoming webhook request body.
	JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalRequestPayloadMetadata) Descriptor deprecated added in v1.4.0

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

Deprecated: Use ExternalRequestPayloadMetadata.ProtoReflect.Descriptor instead.

func (*ExternalRequestPayloadMetadata) GetJsonSchema added in v1.4.0

func (x *ExternalRequestPayloadMetadata) GetJsonSchema() *JSONSchema

func (*ExternalRequestPayloadMetadata) ProtoMessage added in v1.4.0

func (*ExternalRequestPayloadMetadata) ProtoMessage()

func (*ExternalRequestPayloadMetadata) ProtoReflect added in v1.4.0

func (*ExternalRequestPayloadMetadata) Reset added in v1.4.0

func (x *ExternalRequestPayloadMetadata) Reset()

func (*ExternalRequestPayloadMetadata) String added in v1.4.0

type ExternalRequestResponse added in v1.4.0

type ExternalRequestResponse struct {

	// event is a response of a external request.
	Event []byte `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalRequestResponse) Descriptor deprecated added in v1.4.0

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

Deprecated: Use ExternalRequestResponse.ProtoReflect.Descriptor instead.

func (*ExternalRequestResponse) GetEvent added in v1.4.0

func (x *ExternalRequestResponse) GetEvent() []byte

func (*ExternalRequestResponse) ProtoMessage added in v1.4.0

func (*ExternalRequestResponse) ProtoMessage()

func (*ExternalRequestResponse) ProtoReflect added in v1.4.0

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

func (*ExternalRequestResponse) Reset added in v1.4.0

func (x *ExternalRequestResponse) Reset()

func (*ExternalRequestResponse) String added in v1.4.0

func (x *ExternalRequestResponse) String() string

type HandleExternalRequestUnimplemented added in v1.4.0

type HandleExternalRequestUnimplemented struct{}

HandleExternalRequestUnimplemented is used for plugins which doesn't implement HandleExternalRequest method.

func (HandleExternalRequestUnimplemented) HandleExternalRequest added in v1.4.0

HandleExternalRequest returns unimplemented error.

type IncomingWebhookContext added in v1.4.0

type IncomingWebhookContext struct {
	BaseURL          string `protobuf:"bytes,1,opt,name=baseURL,proto3" json:"baseURL,omitempty"`
	FullURLForSource string `protobuf:"bytes,2,opt,name=fullURLForSource,proto3" json:"fullURLForSource,omitempty"`
	// contains filtered or unexported fields
}

func (*IncomingWebhookContext) Descriptor deprecated added in v1.4.0

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

Deprecated: Use IncomingWebhookContext.ProtoReflect.Descriptor instead.

func (*IncomingWebhookContext) GetBaseURL added in v1.4.0

func (x *IncomingWebhookContext) GetBaseURL() string

func (*IncomingWebhookContext) GetFullURLForSource added in v1.4.0

func (x *IncomingWebhookContext) GetFullURLForSource() string

func (*IncomingWebhookContext) ProtoMessage added in v1.4.0

func (*IncomingWebhookContext) ProtoMessage()

func (*IncomingWebhookContext) ProtoReflect added in v1.4.0

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

func (*IncomingWebhookContext) Reset added in v1.4.0

func (x *IncomingWebhookContext) Reset()

func (*IncomingWebhookContext) String added in v1.4.0

func (x *IncomingWebhookContext) String() string

type IncomingWebhookDetailsContext added in v1.4.0

type IncomingWebhookDetailsContext struct {
	BaseURL          string
	FullURLForSource string
}

IncomingWebhookDetailsContext holds incoming webhook context.

type JSONSchema added in v0.18.0

type JSONSchema struct {

	// value is the string value of the JSON schema.
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// ref_url is the remote reference of the JSON schema.
	RefUrl string `protobuf:"bytes,2,opt,name=ref_url,json=refUrl,proto3" json:"ref_url,omitempty"`
	// contains filtered or unexported fields
}

func (*JSONSchema) Descriptor deprecated added in v0.18.0

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

Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead.

func (*JSONSchema) GetRefUrl added in v0.18.0

func (x *JSONSchema) GetRefUrl() string

func (*JSONSchema) GetValue added in v0.18.0

func (x *JSONSchema) GetValue() string

func (*JSONSchema) ProtoMessage added in v0.18.0

func (*JSONSchema) ProtoMessage()

func (*JSONSchema) ProtoReflect added in v0.18.0

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

func (*JSONSchema) Reset added in v0.18.0

func (x *JSONSchema) Reset()

func (*JSONSchema) String added in v0.18.0

func (x *JSONSchema) String() string

type MetadataResponse

type MetadataResponse struct {

	// version is a version of a given plugin. It should follow the SemVer syntax.
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// description is a description of a given plugin.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// json_schema is a JSON schema of a given plugin configuration.
	JsonSchema *JSONSchema `protobuf:"bytes,3,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"`
	// dependencies is a list of dependencies of a given plugin.
	Dependencies map[string]*Dependency `` /* 165-byte string literal not displayed */
	// external_request is a metadata of a given external request.
	ExternalRequest *ExternalRequestMetadata `protobuf:"bytes,5,opt,name=external_request,json=externalRequest,proto3,oneof" json:"external_request,omitempty"`
	// URL to plugin documentation.
	DocumentationUrl string `protobuf:"bytes,6,opt,name=documentation_url,json=documentationUrl,proto3" json:"documentation_url,omitempty"`
	// Recommended plugin recommended
	Recommended bool `protobuf:"varint,7,opt,name=recommended,proto3" json:"recommended,omitempty"`
	// contains filtered or unexported fields
}

func (*MetadataResponse) Descriptor deprecated

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

Deprecated: Use MetadataResponse.ProtoReflect.Descriptor instead.

func (*MetadataResponse) GetDependencies added in v0.18.0

func (x *MetadataResponse) GetDependencies() map[string]*Dependency

func (*MetadataResponse) GetDescription

func (x *MetadataResponse) GetDescription() string

func (*MetadataResponse) GetDocumentationUrl added in v1.7.0

func (x *MetadataResponse) GetDocumentationUrl() string

func (*MetadataResponse) GetExternalRequest added in v1.4.0

func (x *MetadataResponse) GetExternalRequest() *ExternalRequestMetadata

func (*MetadataResponse) GetJsonSchema added in v0.18.0

func (x *MetadataResponse) GetJsonSchema() *JSONSchema

func (*MetadataResponse) GetRecommended added in v1.8.0

func (x *MetadataResponse) GetRecommended() bool

func (*MetadataResponse) GetVersion

func (x *MetadataResponse) GetVersion() string

func (*MetadataResponse) ProtoMessage

func (*MetadataResponse) ProtoMessage()

func (*MetadataResponse) ProtoReflect

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

func (*MetadataResponse) Reset

func (x *MetadataResponse) Reset()

func (*MetadataResponse) String

func (x *MetadataResponse) String() string

type Plugin

type Plugin struct {
	// The GRPC plugin must still implement the Plugin interface.
	plugin.NetRPCUnsupportedPlugin

	// Source represents a concrete implementation that handles the business logic.
	Source Source
}

Plugin This is the implementation of plugin.GRPCPlugin, so we can serve and consume different Botkube Sources.

func (*Plugin) GRPCClient

func (p *Plugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient returns the interface implementation for the plugin that is serving via gRPC by GRPCServer.

func (*Plugin) GRPCServer

func (p *Plugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer registers plugin for serving with the given GRPCServer.

type Source

type Source interface {
	Stream(context.Context, StreamInput) (StreamOutput, error)
	HandleExternalRequest(context.Context, ExternalRequestInput) (ExternalRequestOutput, error)
	Metadata(context.Context) (api.MetadataOutput, error)
}

Source defines the Botkube source plugin functionality.

type SourceClient

type SourceClient interface {
	Stream(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (Source_StreamClient, error)
	HandleExternalRequest(ctx context.Context, in *ExternalRequest, opts ...grpc.CallOption) (*ExternalRequestResponse, error)
	Metadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MetadataResponse, error)
}

SourceClient is the client API for Source 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 NewSourceClient

func NewSourceClient(cc grpc.ClientConnInterface) SourceClient

type SourceContext added in v1.4.0

type SourceContext struct {
	IsInteractivitySupported bool                    `protobuf:"varint,1,opt,name=isInteractivitySupported,proto3" json:"isInteractivitySupported,omitempty"`
	ClusterName              string                  `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"`
	SourceName               string                  `protobuf:"bytes,3,opt,name=sourceName,proto3" json:"sourceName,omitempty"`
	IncomingWebhook          *IncomingWebhookContext `protobuf:"bytes,4,opt,name=incomingWebhook,proto3" json:"incomingWebhook,omitempty"`
	// contains filtered or unexported fields
}

func (*SourceContext) Descriptor deprecated added in v1.4.0

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

Deprecated: Use SourceContext.ProtoReflect.Descriptor instead.

func (*SourceContext) GetClusterName added in v1.4.0

func (x *SourceContext) GetClusterName() string

func (*SourceContext) GetIncomingWebhook added in v1.4.0

func (x *SourceContext) GetIncomingWebhook() *IncomingWebhookContext

func (*SourceContext) GetIsInteractivitySupported added in v1.4.0

func (x *SourceContext) GetIsInteractivitySupported() bool

func (*SourceContext) GetSourceName added in v1.4.0

func (x *SourceContext) GetSourceName() string

func (*SourceContext) ProtoMessage added in v1.4.0

func (*SourceContext) ProtoMessage()

func (*SourceContext) ProtoReflect added in v1.4.0

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

func (*SourceContext) Reset added in v1.4.0

func (x *SourceContext) Reset()

func (*SourceContext) String added in v1.4.0

func (x *SourceContext) String() string

type SourceServer

type SourceServer interface {
	Stream(*StreamRequest, Source_StreamServer) error
	HandleExternalRequest(context.Context, *ExternalRequest) (*ExternalRequestResponse, error)
	Metadata(context.Context, *emptypb.Empty) (*MetadataResponse, error)
	// contains filtered or unexported methods
}

SourceServer is the server API for Source service. All implementations must embed UnimplementedSourceServer for forward compatibility

type Source_StreamClient

type Source_StreamClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type Source_StreamServer

type Source_StreamServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type StreamContext added in v1.0.0

type StreamContext struct {
	SourceContext *SourceContext `protobuf:"bytes,1,opt,name=sourceContext,proto3" json:"sourceContext,omitempty"`
	// kubeConfig is is kubeConfig represented in bytes.
	KubeConfig []byte `protobuf:"bytes,2,opt,name=kubeConfig,proto3" json:"kubeConfig,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamContext) Descriptor deprecated added in v1.0.0

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

Deprecated: Use StreamContext.ProtoReflect.Descriptor instead.

func (*StreamContext) GetKubeConfig added in v1.0.0

func (x *StreamContext) GetKubeConfig() []byte

func (*StreamContext) GetSourceContext added in v1.4.0

func (x *StreamContext) GetSourceContext() *SourceContext

func (*StreamContext) ProtoMessage added in v1.0.0

func (*StreamContext) ProtoMessage()

func (*StreamContext) ProtoReflect added in v1.0.0

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

func (*StreamContext) Reset added in v1.0.0

func (x *StreamContext) Reset()

func (*StreamContext) String added in v1.0.0

func (x *StreamContext) String() string

type StreamInput

type StreamInput struct {
	// Configs is a list of Source configurations specified by users.
	Configs []*Config
	// Context holds streaming context.
	Context StreamInputContext
}

StreamInput holds the input of the Stream function.

type StreamInputContext added in v1.0.0

type StreamInputContext struct {
	// KubeConfig is the path to kubectl configuration file.
	KubeConfig []byte

	CommonSourceContext
}

StreamInputContext holds streaming context.

type StreamOutput

type StreamOutput struct {
	// Event represents the streamed events with message, raw object, and analytics data. It is from the start of plugin consumption.
	// You can construct a complex message.data or just use one of our helper functions:
	//   - api.NewCodeBlockMessage("body", true)
	//   - api.NewPlaintextMessage("body", true)
	Event chan Event
}

StreamOutput holds the output of the Stream function.

type StreamRequest

type StreamRequest struct {

	// Configs is a list of Source configurations specified by users.
	Configs []*Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"`
	// context holds context stream.
	Context *StreamContext `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamRequest) Descriptor deprecated

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

Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.

func (*StreamRequest) GetConfigs

func (x *StreamRequest) GetConfigs() []*Config

func (*StreamRequest) GetContext added in v1.0.0

func (x *StreamRequest) GetContext() *StreamContext

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) ProtoReflect

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

func (*StreamRequest) Reset

func (x *StreamRequest) Reset()

func (*StreamRequest) String

func (x *StreamRequest) String() string

type StreamResponse

type StreamResponse struct {
	Event []byte `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamResponse) Descriptor deprecated

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

Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.

func (*StreamResponse) GetEvent added in v1.0.0

func (x *StreamResponse) GetEvent() []byte

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) ProtoReflect

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

func (*StreamResponse) Reset

func (x *StreamResponse) Reset()

func (*StreamResponse) String

func (x *StreamResponse) String() string

type StreamUnimplemented added in v1.4.0

type StreamUnimplemented struct{}

StreamUnimplemented is used for plugins which doesn't implement Stream method.

func (StreamUnimplemented) Stream added in v1.4.0

Stream returns unimplemented error.

type UnimplementedSourceServer

type UnimplementedSourceServer struct {
}

UnimplementedSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedSourceServer) HandleExternalRequest added in v1.4.0

func (UnimplementedSourceServer) Metadata

func (UnimplementedSourceServer) Stream

type UnsafeSourceServer

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

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

Jump to

Keyboard shortcuts

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