monitordrpc

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: CC0-1.0, CC0-1.0, CC0-1.0, + 2 more Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromNameMatches

func FromNameMatches(n *NameMatches) monitor.NameMatches

FromNameMatches returns the monitor.NameMatches object corresponding to the NameMatches object n

func FromStreamMatches

func FromStreamMatches(m *StreamMatches) (name string, start *monitor.Time, finish *monitor.Time, match monitor.Matches, err error)

FromStreamMatches returns the log name, start time, finish time, and the monitor.Matches object match corresponding to the StreamMatches object m

func RegisterMonitorServer

func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)

func Scan

func Scan(dest *monitor.Entry, e *Entry) error

Scan converts the Entry e, scanning the result into the monitor.Entry object "dest". Any previously set data in "dest" will be deleted or overwritten.

func ToTime

func ToTime(t *Time) (*monitor.Time, error)

ToTime return returns the monitor.Time object corresponding to the Time object t.

Types

type Entry

type Entry struct {
	Identifier           string               `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	LogName              string               `protobuf:"bytes,2,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	LogMessage           string               `protobuf:"bytes,3,opt,name=log_message,json=logMessage,proto3" json:"log_message,omitempty"`
	Data                 string               `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Time                 *timestamp.Timestamp `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Entry represents an entry in a log

func FromEntry

func FromEntry(e monitor.Entry) (*Entry, error)

FromEntry returns the Entry corresponding to the monitor.Entry object e.

func (*Entry) Descriptor

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

func (*Entry) GetData

func (m *Entry) GetData() string

func (*Entry) GetIdentifier

func (m *Entry) GetIdentifier() string

func (*Entry) GetLogMessage

func (m *Entry) GetLogMessage() string

func (*Entry) GetLogName

func (m *Entry) GetLogName() string

func (*Entry) GetTime

func (m *Entry) GetTime() *timestamp.Timestamp

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

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

func (*Entry) XXX_Merge

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

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

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

type EntryMatches

type EntryMatches struct {
	MessageSubstring       string   `protobuf:"bytes,1,opt,name=message_substring,json=messageSubstring,proto3" json:"message_substring,omitempty"`
	MessageNotSubstring    string   `protobuf:"bytes,2,opt,name=message_not_substring,json=messageNotSubstring,proto3" json:"message_not_substring,omitempty"`
	MessageRegexp          string   `protobuf:"bytes,3,opt,name=message_regexp,json=messageRegexp,proto3" json:"message_regexp,omitempty"`
	MessageNotRegexp       string   `protobuf:"bytes,4,opt,name=message_not_regexp,json=messageNotRegexp,proto3" json:"message_not_regexp,omitempty"`
	IdentifierSubstring    string   `protobuf:"bytes,5,opt,name=identifier_substring,json=identifierSubstring,proto3" json:"identifier_substring,omitempty"`
	IdentifierNotSubstring string   `` /* 129-byte string literal not displayed */
	IdentifierRegexp       string   `protobuf:"bytes,7,opt,name=identifier_regexp,json=identifierRegexp,proto3" json:"identifier_regexp,omitempty"`
	IdentifierNotRegexp    string   `protobuf:"bytes,8,opt,name=identifier_not_regexp,json=identifierNotRegexp,proto3" json:"identifier_not_regexp,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

EntryMatches represents a match condition on entries

func (*EntryMatches) Descriptor

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

func (*EntryMatches) GetIdentifierNotRegexp

func (m *EntryMatches) GetIdentifierNotRegexp() string

func (*EntryMatches) GetIdentifierNotSubstring

func (m *EntryMatches) GetIdentifierNotSubstring() string

func (*EntryMatches) GetIdentifierRegexp

func (m *EntryMatches) GetIdentifierRegexp() string

func (*EntryMatches) GetIdentifierSubstring

func (m *EntryMatches) GetIdentifierSubstring() string

func (*EntryMatches) GetMessageNotRegexp

func (m *EntryMatches) GetMessageNotRegexp() string

func (*EntryMatches) GetMessageNotSubstring

func (m *EntryMatches) GetMessageNotSubstring() string

func (*EntryMatches) GetMessageRegexp

func (m *EntryMatches) GetMessageRegexp() string

func (*EntryMatches) GetMessageSubstring

func (m *EntryMatches) GetMessageSubstring() string

func (*EntryMatches) ProtoMessage

func (*EntryMatches) ProtoMessage()

func (*EntryMatches) Reset

func (m *EntryMatches) Reset()

func (*EntryMatches) String

func (m *EntryMatches) String() string

func (*EntryMatches) XXX_DiscardUnknown

func (m *EntryMatches) XXX_DiscardUnknown()

func (*EntryMatches) XXX_Marshal

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

func (*EntryMatches) XXX_Merge

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

func (*EntryMatches) XXX_Size

func (m *EntryMatches) XXX_Size() int

func (*EntryMatches) XXX_Unmarshal

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

type LogName

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

LogName represents a log name

func ToLogName

func ToLogName(n string) *LogName

ToLogName returns the LogName object corresponding to the string n

func (*LogName) Descriptor

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

func (*LogName) GetName

func (m *LogName) GetName() string

func (*LogName) ProtoMessage

func (*LogName) ProtoMessage()

func (*LogName) Reset

func (m *LogName) Reset()

func (*LogName) String

func (m *LogName) String() string

func (*LogName) XXX_DiscardUnknown

func (m *LogName) XXX_DiscardUnknown()

func (*LogName) XXX_Marshal

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

func (*LogName) XXX_Merge

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

func (*LogName) XXX_Size

func (m *LogName) XXX_Size() int

func (*LogName) XXX_Unmarshal

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

type MonitorClient

type MonitorClient interface {
	// IsLogName returns true iff the given string is a log name.
	IsLogName(ctx context.Context, in *LogName, opts ...grpc.CallOption) (*wrappers.BoolValue, error)
	// ListLogNames returns the log names filtered by NameMatches.
	ListLogNames(ctx context.Context, in *NameMatches, opts ...grpc.CallOption) (Monitor_ListLogNamesClient, error)
	// Stream returns a stream down which entries from the "log_name" are
	// passed. Only entries falling into the range determined by "from" and
	// "to" will be returned. If "from" is unassigned then the start of the
	// log will be used; if "to" is unassigned then no end is used. Returned
	// entries will be filtered by EntryMatches.
	Stream(ctx context.Context, in *StreamMatches, opts ...grpc.CallOption) (Monitor_StreamClient, error)
}

MonitorClient is the client API for Monitor service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMonitorClient

func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient

type MonitorServer

type MonitorServer interface {
	// IsLogName returns true iff the given string is a log name.
	IsLogName(context.Context, *LogName) (*wrappers.BoolValue, error)
	// ListLogNames returns the log names filtered by NameMatches.
	ListLogNames(*NameMatches, Monitor_ListLogNamesServer) error
	// Stream returns a stream down which entries from the "log_name" are
	// passed. Only entries falling into the range determined by "from" and
	// "to" will be returned. If "from" is unassigned then the start of the
	// log will be used; if "to" is unassigned then no end is used. Returned
	// entries will be filtered by EntryMatches.
	Stream(*StreamMatches, Monitor_StreamServer) error
}

MonitorServer is the server API for Monitor service.

type Monitor_ListLogNamesClient

type Monitor_ListLogNamesClient interface {
	Recv() (*LogName, error)
	grpc.ClientStream
}

type Monitor_ListLogNamesServer

type Monitor_ListLogNamesServer interface {
	Send(*LogName) error
	grpc.ServerStream
}

type Monitor_StreamClient

type Monitor_StreamClient interface {
	Recv() (*Entry, error)
	grpc.ClientStream
}

type Monitor_StreamServer

type Monitor_StreamServer interface {
	Send(*Entry) error
	grpc.ServerStream
}

type NameMatches

type NameMatches struct {
	Substring            string   `protobuf:"bytes,1,opt,name=substring,proto3" json:"substring,omitempty"`
	NotSubstring         string   `protobuf:"bytes,2,opt,name=not_substring,json=notSubstring,proto3" json:"not_substring,omitempty"`
	Regexp               string   `protobuf:"bytes,3,opt,name=regexp,proto3" json:"regexp,omitempty"`
	NotRegexp            string   `protobuf:"bytes,4,opt,name=not_regexp,json=notRegexp,proto3" json:"not_regexp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NameMatches represents a match condition on log names

func ToNameMatches

func ToNameMatches(n monitor.NameMatches) *NameMatches

ToNameMatches returns the NameMatches object corresponding to the monitor.NameMatches object n

func (*NameMatches) Descriptor

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

func (*NameMatches) GetNotRegexp

func (m *NameMatches) GetNotRegexp() string

func (*NameMatches) GetNotSubstring

func (m *NameMatches) GetNotSubstring() string

func (*NameMatches) GetRegexp

func (m *NameMatches) GetRegexp() string

func (*NameMatches) GetSubstring

func (m *NameMatches) GetSubstring() string

func (*NameMatches) ProtoMessage

func (*NameMatches) ProtoMessage()

func (*NameMatches) Reset

func (m *NameMatches) Reset()

func (*NameMatches) String

func (m *NameMatches) String() string

func (*NameMatches) XXX_DiscardUnknown

func (m *NameMatches) XXX_DiscardUnknown()

func (*NameMatches) XXX_Marshal

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

func (*NameMatches) XXX_Merge

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

func (*NameMatches) XXX_Size

func (m *NameMatches) XXX_Size() int

func (*NameMatches) XXX_Unmarshal

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

type StreamMatches

type StreamMatches struct {
	LogName              *LogName      `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	From                 *Time         `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	To                   *Time         `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
	Match                *EntryMatches `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

StreamMatches describes the search conditions on a log

func ToStreamMatches

func ToStreamMatches(name string, start *monitor.Time, finish *monitor.Time, m monitor.Matches) (*StreamMatches, error)

ToStreamMatches returns the StreamMatches object corresponding to the given log name, start time,finish time, and the monitor.Matches object m

func (*StreamMatches) Descriptor

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

func (*StreamMatches) GetFrom

func (m *StreamMatches) GetFrom() *Time

func (*StreamMatches) GetLogName

func (m *StreamMatches) GetLogName() *LogName

func (*StreamMatches) GetMatch

func (m *StreamMatches) GetMatch() *EntryMatches

func (*StreamMatches) GetTo

func (m *StreamMatches) GetTo() *Time

func (*StreamMatches) ProtoMessage

func (*StreamMatches) ProtoMessage()

func (*StreamMatches) Reset

func (m *StreamMatches) Reset()

func (*StreamMatches) String

func (m *StreamMatches) String() string

func (*StreamMatches) XXX_DiscardUnknown

func (m *StreamMatches) XXX_DiscardUnknown()

func (*StreamMatches) XXX_Marshal

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

func (*StreamMatches) XXX_Merge

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

func (*StreamMatches) XXX_Size

func (m *StreamMatches) XXX_Size() int

func (*StreamMatches) XXX_Unmarshal

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

type Time

type Time struct {
	// Types that are valid to be assigned to Type:
	//	*Time_Unassigned
	//	*Time_Offset
	//	*Time_Time
	Type                 isTime_Type `protobuf_oneof:"type"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Time represents a point in time, which can be either unassigned, a time, or as an offset from the most recent entry in the log. A positive offset represents an offset into the past; a negative offset represents an offset into the future. That is, Time may take one of three possible values:

  • unassigned -- representing no time specified
  • an int64 offset, counting the last log message received as 0
  • a timestamp

func FromTime

func FromTime(t *monitor.Time) (*Time, error)

FromTime returns the Time object corresponding to the monitor.Time object t.

func (*Time) Descriptor

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

func (*Time) GetOffset

func (m *Time) GetOffset() int64

func (*Time) GetTime

func (m *Time) GetTime() *timestamp.Timestamp

func (*Time) GetType

func (m *Time) GetType() isTime_Type

func (*Time) GetUnassigned

func (m *Time) GetUnassigned() bool

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) Reset

func (m *Time) Reset()

func (*Time) String

func (m *Time) String() string

func (*Time) XXX_DiscardUnknown

func (m *Time) XXX_DiscardUnknown()

func (*Time) XXX_Marshal

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

func (*Time) XXX_Merge

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

func (*Time) XXX_OneofWrappers

func (*Time) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Time) XXX_Size

func (m *Time) XXX_Size() int

func (*Time) XXX_Unmarshal

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

type Time_Offset

type Time_Offset struct {
	Offset int64 `protobuf:"varint,2,opt,name=offset,proto3,oneof"`
}

type Time_Time

type Time_Time struct {
	Time *timestamp.Timestamp `protobuf:"bytes,3,opt,name=time,proto3,oneof"`
}

type Time_Unassigned

type Time_Unassigned struct {
	Unassigned bool `protobuf:"varint,1,opt,name=unassigned,proto3,oneof"`
}

type UnimplementedMonitorServer

type UnimplementedMonitorServer struct {
}

UnimplementedMonitorServer can be embedded to have forward compatible implementations.

func (*UnimplementedMonitorServer) IsLogName

func (*UnimplementedMonitorServer) ListLogNames

func (*UnimplementedMonitorServer) Stream

Jump to

Keyboard shortcuts

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