v3

package
v0.0.0-...-ec791aa Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "Normal",
		1: "Error",
	}
	Type_value = map[string]int32{
		"Normal": 0,
		"Error":  1,
	}
)

Enum value maps for Type.

View Source
var File_event_Event_proto protoreflect.FileDescriptor

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)

Types

type Event

type Event struct {

	// Unique ID of the event. Because an event may span a long period of time,
	// the UUID is necessary to associate the start time with the end time of the
	// same event.
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// The source object that the event occurs on.
	Source *Source `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// The name of the event. For example, `Reboot`, `Upgrade` etc.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The type of the event. This field is friendly for UI visualization, where
	// events of type `Normal` are considered as normal operations, while `Error`
	// is considered as unexpected operations, such as `Crash` events, therefore
	// we can mark them with different colors to be easier identified.
	Type Type `protobuf:"varint,4,opt,name=type,proto3,enum=skywalking.v3.Type" json:"type,omitempty"`
	// The detail of the event that describes why this event happened. This should
	// be a one-line message that briefly describes why the event is reported.
	// Examples of an `Upgrade` event may be something like `Upgrade from
	// ${from_version} to ${to_version}`. It's NOT encouraged to include the
	// detailed logs of this event, such as the exception stack trace.
	Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// The parameters in the `message` field.
	Parameters map[string]string `` /* 161-byte string literal not displayed */
	// The start time (in milliseconds) of the event, measured between the current
	// time and midnight, January 1, 1970 UTC. This field is mandatory when an
	// event occurs.
	StartTime int64 `protobuf:"varint,7,opt,name=startTime,proto3" json:"startTime,omitempty"`
	// The end time (in milliseconds) of the event. , measured between the current
	// time and midnight, January 1, 1970 UTC. This field may be empty if the
	// event has not stopped yet, otherwise it should be a valid timestamp after
	// `startTime`.
	EndTime int64 `protobuf:"varint,8,opt,name=endTime,proto3" json:"endTime,omitempty"`
	// [Required] Since 9.0.0
	// Name of the layer to which the event belongs.
	Layer string `protobuf:"bytes,9,opt,name=layer,proto3" json:"layer,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetEndTime

func (x *Event) GetEndTime() int64

func (*Event) GetLayer

func (x *Event) GetLayer() string

func (*Event) GetMessage

func (x *Event) GetMessage() string

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetParameters

func (x *Event) GetParameters() map[string]string

func (*Event) GetSource

func (x *Event) GetSource() *Source

func (*Event) GetStartTime

func (x *Event) GetStartTime() int64

func (*Event) GetType

func (x *Event) GetType() Type

func (*Event) GetUuid

func (x *Event) GetUuid() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventServiceClient

type EventServiceClient interface {
	// When reporting an event, you typically call the collect function twice, one
	// for starting of the event and the other one for ending of the event, with
	// the same UUID. There are also cases where you have both start time and end
	// time already, for example, when exporting events from a 3rd-party system,
	// the start time and end time are already known so that you can call the
	// collect function only once.
	Collect(ctx context.Context, opts ...grpc.CallOption) (EventService_CollectClient, error)
}

EventServiceClient is the client API for EventService 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.

type EventServiceServer

type EventServiceServer interface {
	// When reporting an event, you typically call the collect function twice, one
	// for starting of the event and the other one for ending of the event, with
	// the same UUID. There are also cases where you have both start time and end
	// time already, for example, when exporting events from a 3rd-party system,
	// the start time and end time are already known so that you can call the
	// collect function only once.
	Collect(EventService_CollectServer) error
	// contains filtered or unexported methods
}

EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility

type EventService_CollectClient

type EventService_CollectClient interface {
	Send(*Event) error
	CloseAndRecv() (*v3.Commands, error)
	grpc.ClientStream
}

type EventService_CollectServer

type EventService_CollectServer interface {
	SendAndClose(*v3.Commands) error
	Recv() (*Event, error)
	grpc.ServerStream
}

type Source

type Source struct {
	Service         string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	ServiceInstance string `protobuf:"bytes,2,opt,name=serviceInstance,proto3" json:"serviceInstance,omitempty"`
	Endpoint        string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// contains filtered or unexported fields
}

If the event occurs on a service ONLY, the `service` field is mandatory, the serviceInstance field and endpoint field are optional; If the event occurs on a service instance, the `service` and `serviceInstance` are mandatory and endpoint is optional; If the event occurs on an endpoint, `service` and `endpoint` are mandatory, `serviceInstance` is optional;

func (*Source) Descriptor deprecated

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

Deprecated: Use Source.ProtoReflect.Descriptor instead.

func (*Source) GetEndpoint

func (x *Source) GetEndpoint() string

func (*Source) GetService

func (x *Source) GetService() string

func (*Source) GetServiceInstance

func (x *Source) GetServiceInstance() string

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) ProtoReflect

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

func (*Source) Reset

func (x *Source) Reset()

func (*Source) String

func (x *Source) String() string

type Type

type Type int32
const (
	Type_Normal Type = 0
	Type_Error  Type = 1
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UnimplementedEventServiceServer

type UnimplementedEventServiceServer struct {
}

UnimplementedEventServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEventServiceServer) Collect

type UnsafeEventServiceServer

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

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

Jump to

Keyboard shortcuts

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