Documentation ¶
Overview ¶
Package introproto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterPublisherHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPublisherHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublisherClient) error
- func RegisterPublisherHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)
- type AllMessageFilterStats
- func (*AllMessageFilterStats) Descriptor() ([]byte, []int)
- func (m *AllMessageFilterStats) GetFilters() []*MessageFilterWithStat
- func (*AllMessageFilterStats) ProtoMessage()
- func (m *AllMessageFilterStats) Reset()
- func (m *AllMessageFilterStats) String() string
- func (m *AllMessageFilterStats) XXX_DiscardUnknown()
- func (m *AllMessageFilterStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllMessageFilterStats) XXX_Merge(src proto.Message)
- func (m *AllMessageFilterStats) XXX_Size() int
- func (m *AllMessageFilterStats) XXX_Unmarshal(b []byte) error
- type AllMessageStatByType
- func (*AllMessageStatByType) Descriptor() ([]byte, []int)
- func (m *AllMessageStatByType) GetCounters() []*MessageStatByType
- func (*AllMessageStatByType) ProtoMessage()
- func (m *AllMessageStatByType) Reset()
- func (m *AllMessageStatByType) String() string
- func (m *AllMessageStatByType) XXX_DiscardUnknown()
- func (m *AllMessageStatByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllMessageStatByType) XXX_Merge(src proto.Message)
- func (m *AllMessageStatByType) XXX_Size() int
- func (m *AllMessageStatByType) XXX_Unmarshal(b []byte) error
- type EmptyArgs
- func (*EmptyArgs) Descriptor() ([]byte, []int)
- func (*EmptyArgs) ProtoMessage()
- func (m *EmptyArgs) Reset()
- func (m *EmptyArgs) String() string
- func (m *EmptyArgs) XXX_DiscardUnknown()
- func (m *EmptyArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyArgs) XXX_Merge(src proto.Message)
- func (m *EmptyArgs) XXX_Size() int
- func (m *EmptyArgs) XXX_Unmarshal(b []byte) error
- type MessageFilterByType
- func (*MessageFilterByType) Descriptor() ([]byte, []int)
- func (m *MessageFilterByType) GetEnable() bool
- func (m *MessageFilterByType) GetName() string
- func (*MessageFilterByType) ProtoMessage()
- func (m *MessageFilterByType) Reset()
- func (m *MessageFilterByType) String() string
- func (m *MessageFilterByType) XXX_DiscardUnknown()
- func (m *MessageFilterByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MessageFilterByType) XXX_Merge(src proto.Message)
- func (m *MessageFilterByType) XXX_Size() int
- func (m *MessageFilterByType) XXX_Unmarshal(b []byte) error
- type MessageFilterWithStat
- func (*MessageFilterWithStat) Descriptor() ([]byte, []int)
- func (m *MessageFilterWithStat) GetEnable() bool
- func (m *MessageFilterWithStat) GetFiltered() int64
- func (m *MessageFilterWithStat) GetName() string
- func (*MessageFilterWithStat) ProtoMessage()
- func (m *MessageFilterWithStat) Reset()
- func (m *MessageFilterWithStat) String() string
- func (m *MessageFilterWithStat) XXX_DiscardUnknown()
- func (m *MessageFilterWithStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MessageFilterWithStat) XXX_Merge(src proto.Message)
- func (m *MessageFilterWithStat) XXX_Size() int
- func (m *MessageFilterWithStat) XXX_Unmarshal(b []byte) error
- type MessageStatByType
- func (*MessageStatByType) Descriptor() ([]byte, []int)
- func (m *MessageStatByType) GetCount() int64
- func (m *MessageStatByType) GetName() string
- func (*MessageStatByType) ProtoMessage()
- func (m *MessageStatByType) Reset()
- func (m *MessageStatByType) String() string
- func (m *MessageStatByType) XXX_DiscardUnknown()
- func (m *MessageStatByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MessageStatByType) XXX_Merge(src proto.Message)
- func (m *MessageStatByType) XXX_Size() int
- func (m *MessageStatByType) XXX_Unmarshal(b []byte) error
- type PublisherClient
- type PublisherServer
- type UnimplementedPublisherServer
- func (*UnimplementedPublisherServer) GetMessagesFilters(ctx context.Context, req *EmptyArgs) (*AllMessageFilterStats, error)
- func (*UnimplementedPublisherServer) GetMessagesStat(ctx context.Context, req *EmptyArgs) (*AllMessageStatByType, error)
- func (*UnimplementedPublisherServer) SetMessagesFilter(ctx context.Context, req *MessageFilterByType) (*MessageFilterByType, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPublisherHandler ¶
func RegisterPublisherHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPublisherHandler registers the http handlers for service Publisher to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPublisherHandlerClient ¶
func RegisterPublisherHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PublisherClient) error
RegisterPublisherHandlerClient registers the http handlers for service Publisher to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PublisherClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PublisherClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PublisherClient" to call the correct interceptors.
func RegisterPublisherHandlerFromEndpoint ¶
func RegisterPublisherHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPublisherHandlerFromEndpoint is same as RegisterPublisherHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPublisherServer ¶
func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)
Types ¶
type AllMessageFilterStats ¶
type AllMessageFilterStats struct { Filters []*MessageFilterWithStat `protobuf:"bytes,1,rep,name=Filters,proto3" json:"Filters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
AllMessageFilterStats map of MessageFilterWithStat per message type.
func (*AllMessageFilterStats) Descriptor ¶
func (*AllMessageFilterStats) Descriptor() ([]byte, []int)
func (*AllMessageFilterStats) GetFilters ¶
func (m *AllMessageFilterStats) GetFilters() []*MessageFilterWithStat
func (*AllMessageFilterStats) ProtoMessage ¶
func (*AllMessageFilterStats) ProtoMessage()
func (*AllMessageFilterStats) Reset ¶
func (m *AllMessageFilterStats) Reset()
func (*AllMessageFilterStats) String ¶
func (m *AllMessageFilterStats) String() string
func (*AllMessageFilterStats) XXX_DiscardUnknown ¶
func (m *AllMessageFilterStats) XXX_DiscardUnknown()
func (*AllMessageFilterStats) XXX_Marshal ¶
func (m *AllMessageFilterStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllMessageFilterStats) XXX_Merge ¶
func (m *AllMessageFilterStats) XXX_Merge(src proto.Message)
func (*AllMessageFilterStats) XXX_Size ¶
func (m *AllMessageFilterStats) XXX_Size() int
func (*AllMessageFilterStats) XXX_Unmarshal ¶
func (m *AllMessageFilterStats) XXX_Unmarshal(b []byte) error
type AllMessageStatByType ¶
type AllMessageStatByType struct { Counters []*MessageStatByType `protobuf:"bytes,1,rep,name=Counters,proto3" json:"Counters,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
AllMessageStatByType is a list of counters per message type.
func (*AllMessageStatByType) Descriptor ¶
func (*AllMessageStatByType) Descriptor() ([]byte, []int)
func (*AllMessageStatByType) GetCounters ¶
func (m *AllMessageStatByType) GetCounters() []*MessageStatByType
func (*AllMessageStatByType) ProtoMessage ¶
func (*AllMessageStatByType) ProtoMessage()
func (*AllMessageStatByType) Reset ¶
func (m *AllMessageStatByType) Reset()
func (*AllMessageStatByType) String ¶
func (m *AllMessageStatByType) String() string
func (*AllMessageStatByType) XXX_DiscardUnknown ¶
func (m *AllMessageStatByType) XXX_DiscardUnknown()
func (*AllMessageStatByType) XXX_Marshal ¶
func (m *AllMessageStatByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllMessageStatByType) XXX_Merge ¶
func (m *AllMessageStatByType) XXX_Merge(src proto.Message)
func (*AllMessageStatByType) XXX_Size ¶
func (m *AllMessageStatByType) XXX_Size() int
func (*AllMessageStatByType) XXX_Unmarshal ¶
func (m *AllMessageStatByType) XXX_Unmarshal(b []byte) error
type EmptyArgs ¶
type EmptyArgs struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EmptyArgs is just a stub for grpc methods without arguments.
func (*EmptyArgs) Descriptor ¶
func (*EmptyArgs) ProtoMessage ¶
func (*EmptyArgs) ProtoMessage()
func (*EmptyArgs) XXX_DiscardUnknown ¶
func (m *EmptyArgs) XXX_DiscardUnknown()
func (*EmptyArgs) XXX_Marshal ¶
func (*EmptyArgs) XXX_Unmarshal ¶
type MessageFilterByType ¶
type MessageFilterByType struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Enable bool `protobuf:"varint,2,opt,name=Enable,proto3" json:"Enable,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MessageFilterByType represents filter state for message type.
func (*MessageFilterByType) Descriptor ¶
func (*MessageFilterByType) Descriptor() ([]byte, []int)
func (*MessageFilterByType) GetEnable ¶
func (m *MessageFilterByType) GetEnable() bool
func (*MessageFilterByType) GetName ¶
func (m *MessageFilterByType) GetName() string
func (*MessageFilterByType) ProtoMessage ¶
func (*MessageFilterByType) ProtoMessage()
func (*MessageFilterByType) Reset ¶
func (m *MessageFilterByType) Reset()
func (*MessageFilterByType) String ¶
func (m *MessageFilterByType) String() string
func (*MessageFilterByType) XXX_DiscardUnknown ¶
func (m *MessageFilterByType) XXX_DiscardUnknown()
func (*MessageFilterByType) XXX_Marshal ¶
func (m *MessageFilterByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageFilterByType) XXX_Merge ¶
func (m *MessageFilterByType) XXX_Merge(src proto.Message)
func (*MessageFilterByType) XXX_Size ¶
func (m *MessageFilterByType) XXX_Size() int
func (*MessageFilterByType) XXX_Unmarshal ¶
func (m *MessageFilterByType) XXX_Unmarshal(b []byte) error
type MessageFilterWithStat ¶
type MessageFilterWithStat struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Enable bool `protobuf:"varint,2,opt,name=Enable,proto3" json:"Enable,omitempty"` Filtered int64 `protobuf:"varint,3,opt,name=Filtered,proto3" json:"Filtered,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MessageFilterWithStat represents filter state and count of filtered messages.
func (*MessageFilterWithStat) Descriptor ¶
func (*MessageFilterWithStat) Descriptor() ([]byte, []int)
func (*MessageFilterWithStat) GetEnable ¶
func (m *MessageFilterWithStat) GetEnable() bool
func (*MessageFilterWithStat) GetFiltered ¶
func (m *MessageFilterWithStat) GetFiltered() int64
func (*MessageFilterWithStat) GetName ¶
func (m *MessageFilterWithStat) GetName() string
func (*MessageFilterWithStat) ProtoMessage ¶
func (*MessageFilterWithStat) ProtoMessage()
func (*MessageFilterWithStat) Reset ¶
func (m *MessageFilterWithStat) Reset()
func (*MessageFilterWithStat) String ¶
func (m *MessageFilterWithStat) String() string
func (*MessageFilterWithStat) XXX_DiscardUnknown ¶
func (m *MessageFilterWithStat) XXX_DiscardUnknown()
func (*MessageFilterWithStat) XXX_Marshal ¶
func (m *MessageFilterWithStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageFilterWithStat) XXX_Merge ¶
func (m *MessageFilterWithStat) XXX_Merge(src proto.Message)
func (*MessageFilterWithStat) XXX_Size ¶
func (m *MessageFilterWithStat) XXX_Size() int
func (*MessageFilterWithStat) XXX_Unmarshal ¶
func (m *MessageFilterWithStat) XXX_Unmarshal(b []byte) error
type MessageStatByType ¶
type MessageStatByType struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Count int64 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MessageStatByType is a counter for message type.
func (*MessageStatByType) Descriptor ¶
func (*MessageStatByType) Descriptor() ([]byte, []int)
func (*MessageStatByType) GetCount ¶
func (m *MessageStatByType) GetCount() int64
func (*MessageStatByType) GetName ¶
func (m *MessageStatByType) GetName() string
func (*MessageStatByType) ProtoMessage ¶
func (*MessageStatByType) ProtoMessage()
func (*MessageStatByType) Reset ¶
func (m *MessageStatByType) Reset()
func (*MessageStatByType) String ¶
func (m *MessageStatByType) String() string
func (*MessageStatByType) XXX_DiscardUnknown ¶
func (m *MessageStatByType) XXX_DiscardUnknown()
func (*MessageStatByType) XXX_Marshal ¶
func (m *MessageStatByType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageStatByType) XXX_Merge ¶
func (m *MessageStatByType) XXX_Merge(src proto.Message)
func (*MessageStatByType) XXX_Size ¶
func (m *MessageStatByType) XXX_Size() int
func (*MessageStatByType) XXX_Unmarshal ¶
func (m *MessageStatByType) XXX_Unmarshal(b []byte) error
type PublisherClient ¶
type PublisherClient interface { // SetMessagesFilter enables/disables messages publishing by type. SetMessagesFilter(ctx context.Context, in *MessageFilterByType, opts ...grpc.CallOption) (*MessageFilterByType, error) // GetMessagesFilters returns map with filter state for every message type. GetMessagesFilters(ctx context.Context, in *EmptyArgs, opts ...grpc.CallOption) (*AllMessageFilterStats, error) // GetMessagesStat returns statistic for published messages by type. GetMessagesStat(ctx context.Context, in *EmptyArgs, opts ...grpc.CallOption) (*AllMessageStatByType, error) }
PublisherClient is the client API for Publisher service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPublisherClient ¶
func NewPublisherClient(cc *grpc.ClientConn) PublisherClient
type PublisherServer ¶
type PublisherServer interface { // SetMessagesFilter enables/disables messages publishing by type. SetMessagesFilter(context.Context, *MessageFilterByType) (*MessageFilterByType, error) // GetMessagesFilters returns map with filter state for every message type. GetMessagesFilters(context.Context, *EmptyArgs) (*AllMessageFilterStats, error) // GetMessagesStat returns statistic for published messages by type. GetMessagesStat(context.Context, *EmptyArgs) (*AllMessageStatByType, error) }
PublisherServer is the server API for Publisher service.
type UnimplementedPublisherServer ¶
type UnimplementedPublisherServer struct { }
UnimplementedPublisherServer can be embedded to have forward compatible implementations.
func (*UnimplementedPublisherServer) GetMessagesFilters ¶
func (*UnimplementedPublisherServer) GetMessagesFilters(ctx context.Context, req *EmptyArgs) (*AllMessageFilterStats, error)
func (*UnimplementedPublisherServer) GetMessagesStat ¶
func (*UnimplementedPublisherServer) GetMessagesStat(ctx context.Context, req *EmptyArgs) (*AllMessageStatByType, error)
func (*UnimplementedPublisherServer) SetMessagesFilter ¶
func (*UnimplementedPublisherServer) SetMessagesFilter(ctx context.Context, req *MessageFilterByType) (*MessageFilterByType, error)