Documentation
¶
Index ¶
- Variables
- func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)
- type ActiveReq
- type Broker
- type BrokerClient
- type BrokerServer
- type Broker_SubscribeClient
- type Broker_SubscribeServer
- type Client
- func (c *Client) Err() chan error
- func (c *Client) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
- func (c *Client) Req() chan *ComponentEvent
- func (c *Client) RequireTransportSecurity() bool
- func (c *Client) SendReq(ctx context.Context, req *core.Event, start time.Time) (*core.Event, error)
- func (c *Client) SendReqChan(req *core.Event, start time.Time) (chan *core.Event, error)
- func (c *Client) SendResp(resp *core.Event, start time.Time) error
- func (c *Client) SendTelemetry(spans []*telemetry.Span, logRecords []*logsv1.LogRecord)
- func (c *Client) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- func (c *Client) Start(def *api.ComponentDefinition, maxAttempts int)
- func (c *Client) StartHealthSrv() error
- type ClientOpts
- type ComponentEvent
- type UnimplementedBrokerServer
- type UnsafeBrokerServer
Constants ¶
This section is empty.
Variables ¶
var Broker_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kubefox.proto.v1.Broker", HandlerType: (*BrokerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Broker_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "broker_svc.proto", }
Broker_ServiceDesc is the grpc.ServiceDesc for Broker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterBrokerServer ¶
func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)
Types ¶
type Broker ¶ added in v0.6.0
type Broker struct { Broker_SubscribeClient otelgrpc.TraceServiceClient }
type BrokerClient ¶
type BrokerClient interface {
Subscribe(ctx context.Context, opts ...grpc.CallOption) (Broker_SubscribeClient, error)
}
BrokerClient is the client API for Broker 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 NewBrokerClient ¶
func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient
type BrokerServer ¶
type BrokerServer interface { Subscribe(Broker_SubscribeServer) error // contains filtered or unexported methods }
BrokerServer is the server API for Broker service. All implementations must embed UnimplementedBrokerServer for forward compatibility
type Broker_SubscribeClient ¶
type Broker_SubscribeClient interface { Send(*core.Event) error Recv() (*core.MatchedEvent, error) grpc.ClientStream }
type Broker_SubscribeServer ¶
type Broker_SubscribeServer interface { Send(*core.MatchedEvent) error Recv() (*core.Event, error) grpc.ServerStream }
type Client ¶
type Client struct { ClientOpts // contains filtered or unexported fields }
func NewClient ¶
func NewClient(opts ClientOpts) *Client
func (*Client) GetRequestMetadata ¶
func (*Client) Req ¶
func (c *Client) Req() chan *ComponentEvent
func (*Client) RequireTransportSecurity ¶
func (*Client) SendReqChan ¶
func (*Client) SendTelemetry ¶ added in v0.7.0
func (*Client) Start ¶
func (c *Client) Start(def *api.ComponentDefinition, maxAttempts int)
Start connects to the broker and begins sending and receiving messages. It is a blocking call.
func (*Client) StartHealthSrv ¶
type ClientOpts ¶
type ComponentEvent ¶
type ComponentEvent struct { *core.MatchedEvent ReceivedAt time.Time }
type UnimplementedBrokerServer ¶
type UnimplementedBrokerServer struct { }
UnimplementedBrokerServer must be embedded to have forward compatible implementations.
func (UnimplementedBrokerServer) Subscribe ¶
func (UnimplementedBrokerServer) Subscribe(Broker_SubscribeServer) error
type UnsafeBrokerServer ¶
type UnsafeBrokerServer interface {
// contains filtered or unexported methods
}
UnsafeBrokerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BrokerServer will result in compilation errors.