grpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent   = fmt.Errorf("proto: integer overflow")
)
View Source
var Level_name = map[int32]string{
	0: "INFO",
	1: "DEBUG",
	2: "WARNING",
	3: "ERROR",
}
View Source
var Level_value = map[string]int32{
	"INFO":    0,
	"DEBUG":   1,
	"WARNING": 2,
	"ERROR":   3,
}

Functions

func RegisterEmitterServer

func RegisterEmitterServer(s *grpc.Server, srv EmitterServer)

Types

type EmitterClient

type EmitterClient interface {
	// Listen starts listening to events.
	Listen(ctx context.Context, in *ListenReq, opts ...grpc.CallOption) (Emitter_ListenClient, error)
}

func NewEmitterClient

func NewEmitterClient(cc *grpc.ClientConn) EmitterClient

type EmitterServer

type EmitterServer interface {
	// Listen starts listening to events.
	Listen(*ListenReq, Emitter_ListenServer) error
}

type Emitter_ListenClient

type Emitter_ListenClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type Emitter_ListenServer

type Emitter_ListenServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type Event

type Event struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Level                Level    `protobuf:"varint,2,opt,name=level,proto3,enum=stratumn.node.core.app.event.grpc.Level" json:"level,omitempty"`
	Topic                string   `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The Event message containing what should be displayed, with optional display customization (if supported by the listener).

func (*Event) Descriptor

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

func (*Event) GetLevel

func (m *Event) GetLevel() Level

func (*Event) GetMessage

func (m *Event) GetMessage() string

func (*Event) GetTopic

func (m *Event) GetTopic() string

func (*Event) Marshal

func (m *Event) Marshal() (dAtA []byte, err error)

func (*Event) MarshalTo

func (m *Event) MarshalTo(dAtA []byte) (int, error)

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

func (m *Event) Unmarshal(dAtA []byte) error

func (*Event) XXX_DiscardUnknown added in v0.2.0

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal added in v0.2.0

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

func (*Event) XXX_Merge added in v0.2.0

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

func (*Event) XXX_Size added in v0.2.0

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal added in v0.2.0

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

type Level

type Level int32
const (
	Level_INFO    Level = 0
	Level_DEBUG   Level = 1
	Level_WARNING Level = 2
	Level_ERROR   Level = 3
)

func (Level) EnumDescriptor

func (Level) EnumDescriptor() ([]byte, []int)

func (Level) String

func (x Level) String() string

type ListenReq

type ListenReq struct {
	Topic                string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The Listen request message.

func (*ListenReq) Descriptor

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

func (*ListenReq) GetTopic

func (m *ListenReq) GetTopic() string

func (*ListenReq) Marshal

func (m *ListenReq) Marshal() (dAtA []byte, err error)

func (*ListenReq) MarshalTo

func (m *ListenReq) MarshalTo(dAtA []byte) (int, error)

func (*ListenReq) ProtoMessage

func (*ListenReq) ProtoMessage()

func (*ListenReq) Reset

func (m *ListenReq) Reset()

func (*ListenReq) Size

func (m *ListenReq) Size() (n int)

func (*ListenReq) String

func (m *ListenReq) String() string

func (*ListenReq) Unmarshal

func (m *ListenReq) Unmarshal(dAtA []byte) error

func (*ListenReq) XXX_DiscardUnknown added in v0.2.0

func (m *ListenReq) XXX_DiscardUnknown()

func (*ListenReq) XXX_Marshal added in v0.2.0

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

func (*ListenReq) XXX_Merge added in v0.2.0

func (dst *ListenReq) XXX_Merge(src proto.Message)

func (*ListenReq) XXX_Size added in v0.2.0

func (m *ListenReq) XXX_Size() int

func (*ListenReq) XXX_Unmarshal added in v0.2.0

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

Directories

Path Synopsis
Package mockgrpc is a generated GoMock package.
Package mockgrpc is a generated GoMock package.

Jump to

Keyboard shortcuts

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