Update go-winio in vendor.conf

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
This commit is contained in:
Kevin Parsons
2019-04-13 22:02:23 -07:00
parent 32e788a8be
commit 05dd66b2e6
9 changed files with 483 additions and 262 deletions

View File

@@ -1,13 +1,13 @@
package etw
import (
"golang.org/x/sys/windows"
"github.com/Microsoft/go-winio/pkg/guid"
)
type eventOptions struct {
descriptor *eventDescriptor
activityID *windows.GUID
relatedActivityID *windows.GUID
activityID *guid.GUID
relatedActivityID *guid.GUID
tags uint32
}
@@ -36,12 +36,20 @@ func WithKeyword(keyword uint64) EventOpt {
}
}
// WithChannel specifies the channel of the event to be written.
func WithChannel(channel Channel) EventOpt {
return func(options *eventOptions) {
options.descriptor.channel = channel
}
}
// WithOpcode specifies the opcode of the event to be written.
func WithOpcode(opcode Opcode) EventOpt {
return func(options *eventOptions) {
options.descriptor.opcode = opcode
}
}
// WithTags specifies the tags of the event to be written. Tags is a 28-bit
// value (top 4 bits are ignored) which are interpreted by the event consumer.
func WithTags(newTags uint32) EventOpt {
@@ -50,13 +58,15 @@ func WithTags(newTags uint32) EventOpt {
}
}
func WithActivityID(activityID *windows.GUID) EventOpt {
// WithActivityID specifies the activity ID of the event to be written.
func WithActivityID(activityID *guid.GUID) EventOpt {
return func(options *eventOptions) {
options.activityID = activityID
}
}
func WithRelatedActivityID(activityID *windows.GUID) EventOpt {
// WithRelatedActivityID specifies the parent activity ID of the event to be written.
func WithRelatedActivityID(activityID *guid.GUID) EventOpt {
return func(options *eventOptions) {
options.relatedActivityID = activityID
}