| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // |
| // Code generated by third_party/go/regen-fidl; DO NOT EDIT. |
| |
| package diagnostics |
| |
| import ( |
| _zx "syscall/zx" |
| _bindings "syscall/zx/fidl" |
| fuchsiamem "syscall/zx/mem" |
| ) |
| |
| const ( |
| // The size bound of 1024 is a reasonably low size restriction that meets most |
| // canonical selectors we've ecountered. |
| MaximumRawSelectorLength uint16 = 1024 |
| // The size 64 was chosen because entries in batches are handles to |
| // VMOs and there is a limit of 64 handles per fidl message. |
| MaximumEntriesPerBatch uint16 = 64 |
| MaxStringSelectorLength uint16 = 100 |
| MaxMonikerSegments uint16 = 25 |
| MaxDataHierarchyDepth uint16 = 100 |
| ) |
| |
| var _ _bindings.Enum = Format(0) |
| |
| // Enum used to specify the output format for |
| // Reader results. |
| type Format uint32 |
| |
| const ( |
| |
| // Dump read results per the Diagnostics Json |
| // Schema specifications. |
| FormatJson Format = 1 |
| |
| // Dump read results per the Iquery text specifications. |
| FormatText Format = 2 |
| ) |
| |
| func (_ Format) I_EnumValues() []Format { |
| return []Format{ |
| FormatJson, |
| FormatText, |
| } |
| } |
| |
| func (_ Format) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x Format) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x Format) String() string { |
| switch x { |
| case 1: |
| return "Json" |
| case 2: |
| return "Text" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = ReaderError(0) |
| |
| // Enum describing the potential failure states of the streaming protocol when serving results |
| // to the client over the result iterator. |
| type ReaderError uint32 |
| |
| const ( |
| ReaderErrorIo ReaderError = 1 |
| ) |
| |
| func (_ ReaderError) I_EnumValues() []ReaderError { |
| return []ReaderError{ |
| ReaderErrorIo, |
| } |
| } |
| |
| func (_ ReaderError) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x ReaderError) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x ReaderError) String() string { |
| switch x { |
| case 1: |
| return "Io" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = StreamMode(0) |
| |
| // Enum specifying the modes by which a user can connect to and stream diagnostics metrics. |
| type StreamMode uint8 |
| |
| const ( |
| |
| // The stream will serve a snapshot of the diagnostics data at the time of |
| // connection, then end. |
| StreamModeSnapshot StreamMode = 1 |
| |
| // The stream will serve a snapshot of the diagnostics data at the time of |
| // connection, then subsequent calls to the stream will hang until |
| // new diagnostics data is available. |
| StreamModeSnapshotThenSubscribe StreamMode = 2 |
| |
| // Calls to the stream will hang until new diagnostics data is available. Between calls to |
| // the stream, newly arrived data is buffered. |
| StreamModeSubscribe StreamMode = 3 |
| ) |
| |
| func (_ StreamMode) I_EnumValues() []StreamMode { |
| return []StreamMode{ |
| StreamModeSnapshot, |
| StreamModeSnapshotThenSubscribe, |
| StreamModeSubscribe, |
| } |
| } |
| |
| func (_ StreamMode) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x StreamMode) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| case 3: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x StreamMode) String() string { |
| switch x { |
| case 1: |
| return "Snapshot" |
| case 2: |
| return "SnapshotThenSubscribe" |
| case 3: |
| return "Subscribe" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = DataType(0) |
| |
| type DataType uint8 |
| |
| const ( |
| |
| // Complete inspect hierarchies on the system. |
| DataTypeInspect DataType = 1 |
| |
| // Start|Stop|Running|DiagnosticsReady events on the system. |
| DataTypeLifecycle DataType = 2 |
| |
| // Log streams on the system. |
| DataTypeLogs DataType = 3 |
| ) |
| |
| func (_ DataType) I_EnumValues() []DataType { |
| return []DataType{ |
| DataTypeInspect, |
| DataTypeLifecycle, |
| DataTypeLogs, |
| } |
| } |
| |
| func (_ DataType) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x DataType) IsUnknown() bool { |
| switch x { |
| case 1: |
| return false |
| case 2: |
| return false |
| case 3: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x DataType) String() string { |
| switch x { |
| case 1: |
| return "Inspect" |
| case 2: |
| return "Lifecycle" |
| case 3: |
| return "Logs" |
| } |
| return "Unknown" |
| } |
| |
| var _ _bindings.Enum = Severity(0) |
| |
| // The severity of a given record. |
| type Severity uint8 |
| |
| const ( |
| |
| // Trace records include detailed information about program execution. |
| SeverityTrace Severity = 16 |
| |
| // Debug records include development-facing information about program execution. |
| SeverityDebug Severity = 32 |
| |
| // Info records include general information about program execution. (default) |
| SeverityInfo Severity = 48 |
| |
| // Warning records include information about potentially problematic operations. |
| SeverityWarn Severity = 64 |
| |
| // Error records include information about failed operations. |
| SeverityError Severity = 80 |
| |
| // Fatal records convey information about operations which cause a program's termination. |
| SeverityFatal Severity = 96 |
| ) |
| |
| func (_ Severity) I_EnumValues() []Severity { |
| return []Severity{ |
| SeverityTrace, |
| SeverityDebug, |
| SeverityInfo, |
| SeverityWarn, |
| SeverityError, |
| SeverityFatal, |
| } |
| } |
| |
| func (_ Severity) I_EnumIsStrict() bool { |
| return true |
| } |
| |
| func (x Severity) IsUnknown() bool { |
| switch x { |
| case 16: |
| return false |
| case 32: |
| return false |
| case 48: |
| return false |
| case 64: |
| return false |
| case 80: |
| return false |
| case 96: |
| return false |
| default: |
| return true |
| } |
| } |
| |
| func (x Severity) String() string { |
| switch x { |
| case 16: |
| return "Trace" |
| case 32: |
| return "Debug" |
| case 48: |
| return "Info" |
| case 64: |
| return "Warn" |
| case 80: |
| return "Error" |
| case 96: |
| return "Fatal" |
| } |
| return "Unknown" |
| } |
| |
| type BatchIteratorGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Batch []FormattedContent `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"64"` |
| } |
| |
| var _mBatchIteratorGetNextResponse = _bindings.CreateLazyMarshaler(BatchIteratorGetNextResponse{}) |
| |
| func (msg *BatchIteratorGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mBatchIteratorGetNextResponse |
| } |
| |
| // A selector defining a set of nodes to match, for which the entire subtree including |
| // those nodes are selected. |
| type SubtreeSelector struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| // A vector of StringSelectors which serve as a pattern matcher |
| // for paths through a hierarchy of named nodes. Each entry in the vector |
| // is a selector for a single named node in a data hierarchy. The vector |
| // of selectors for named nodes, then, defines a selector on paths through the |
| // data hierarchy. |
| // |
| // Node paths support wildcarding, which will glob a single level of a |
| // node hierarchy. eg: |
| // root/a/b/*/d |
| // will match all nodes named d which are below some child of node b. |
| // root/a/b/c* |
| // will match all nodes below b which start with the character "c". |
| NodePath []StringSelector `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"100"` |
| } |
| |
| var _mSubtreeSelector = _bindings.CreateLazyMarshaler(SubtreeSelector{}) |
| |
| func (msg *SubtreeSelector) Marshaler() _bindings.Marshaler { |
| return _mSubtreeSelector |
| } |
| |
| // A selector defining a set of nodes to match, and on those matched nodes a set of named |
| // properties to match. |
| type PropertySelector struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v2:"32" fidl_alignment_v2:"8"` |
| // A vector of StringSelectors which serve as a pattern matcher |
| // for paths through a hierarchy of named nodes. Each entry in the vector |
| // is a selector for a single named node in a data hierarchy. The vector |
| // of selectors for named nodes, then, defines a selector on paths through the |
| // data hierarchy. |
| // |
| // Node paths support wildcarding, which will glob a single level of a |
| // node hierarchy. eg: |
| // root/a/b/*/d |
| // will match all nodes named d which are below some child of node b. |
| // root/a/b/c* |
| // will match all nodes below b which start with the character "c". |
| NodePath []StringSelector `fidl_offset_v1:"0" fidl_offset_v2:"0" fidl_bounds:"100"` |
| // A StringSelector which serves as a pattern matcher for |
| // string-named properties on a node in a data hierarchy. |
| // |
| // target_properties supports wildcarding, which will match against all properties |
| // on any node matched by node_path. |
| TargetProperties StringSelector `fidl_offset_v1:"16" fidl_offset_v2:"16"` |
| } |
| |
| var _mPropertySelector = _bindings.CreateLazyMarshaler(PropertySelector{}) |
| |
| func (msg *PropertySelector) Marshaler() _bindings.Marshaler { |
| return _mPropertySelector |
| } |
| |
| type archiveAccessorWithCtxStreamDiagnosticsRequest struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"24" fidl_alignment_v2:"8"` |
| StreamParameters StreamParameters `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| ResultStream BatchIteratorWithCtxInterfaceRequest `fidl_offset_v1:"16" fidl_offset_v2:"16" fidl_handle_subtype:"4" fidl_bounds:"0"` |
| } |
| |
| var _marchiveAccessorWithCtxStreamDiagnosticsRequest = _bindings.CreateLazyMarshaler(archiveAccessorWithCtxStreamDiagnosticsRequest{}) |
| |
| func (msg *archiveAccessorWithCtxStreamDiagnosticsRequest) Marshaler() _bindings.Marshaler { |
| return _marchiveAccessorWithCtxStreamDiagnosticsRequest |
| } |
| |
| type batchIteratorWithCtxGetNextResponse struct { |
| _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8"` |
| Result BatchIteratorGetNextResult `fidl_offset_v1:"0" fidl_offset_v2:"0"` |
| } |
| |
| var _mbatchIteratorWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(batchIteratorWithCtxGetNextResponse{}) |
| |
| func (msg *batchIteratorWithCtxGetNextResponse) Marshaler() _bindings.Marshaler { |
| return _mbatchIteratorWithCtxGetNextResponse |
| } |
| |
| type I_batchIteratorGetNextResultTag uint64 |
| |
| const ( |
| BatchIteratorGetNextResultResponse = 1 // 0x00000001 |
| BatchIteratorGetNextResultErr = 2 // 0x00000002 |
| ) |
| |
| type BatchIteratorGetNextResult struct { |
| I_batchIteratorGetNextResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| Response BatchIteratorGetNextResponse `fidl_ordinal:"1"` |
| Err ReaderError `fidl_ordinal:"2"` |
| } |
| |
| func (_m *BatchIteratorGetNextResult) reset() { |
| switch _m.I_batchIteratorGetNextResultTag { |
| case 1: |
| var _zeroed BatchIteratorGetNextResponse |
| _m.Response = _zeroed |
| case 2: |
| var _zeroed ReaderError |
| _m.Err = _zeroed |
| } |
| } |
| |
| func (_m *BatchIteratorGetNextResult) Which() I_batchIteratorGetNextResultTag { |
| return _m.I_batchIteratorGetNextResultTag |
| } |
| |
| func (_m *BatchIteratorGetNextResult) Ordinal() uint64 { |
| return uint64(_m.I_batchIteratorGetNextResultTag) |
| } |
| |
| func (_m *BatchIteratorGetNextResult) SetResponse(response BatchIteratorGetNextResponse) { |
| _m.reset() |
| _m.I_batchIteratorGetNextResultTag = BatchIteratorGetNextResultResponse |
| _m.Response = response |
| } |
| |
| func BatchIteratorGetNextResultWithResponse(response BatchIteratorGetNextResponse) BatchIteratorGetNextResult { |
| var _u BatchIteratorGetNextResult |
| _u.SetResponse(response) |
| return _u |
| } |
| |
| func (_m *BatchIteratorGetNextResult) SetErr(err ReaderError) { |
| _m.reset() |
| _m.I_batchIteratorGetNextResultTag = BatchIteratorGetNextResultErr |
| _m.Err = err |
| } |
| |
| func BatchIteratorGetNextResultWithErr(err ReaderError) BatchIteratorGetNextResult { |
| var _u BatchIteratorGetNextResult |
| _u.SetErr(err) |
| return _u |
| } |
| |
| type I_selectorArgumentTag uint64 |
| |
| const ( |
| SelectorArgument_unknownData = 0 // 0x00000000 |
| SelectorArgumentStructuredSelector = 1 // 0x00000001 |
| SelectorArgumentRawSelector = 2 // 0x00000002 |
| ) |
| |
| // Argument used for Archive selectors, can be either the pre-parsed |
| // fidl struct or string representation. |
| type SelectorArgument struct { |
| I_selectorArgumentTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // A Selector defining a pattern-matcher which selects for components within a hierarchy |
| // and properties in a data hierarchy namespaced by component. |
| StructuredSelector Selector `fidl_ordinal:"1"` |
| // A raw string representing a [fuchsia.diagnostics/Selector]. |
| // The Selector defines a pattern-matcher which selects for components within a hierarchy |
| // and properties in a data hierarchy namespaced by component. |
| // NOTE: All StringSelectors parsed from the raw_selector will be interpreted in |
| // string_pattern mode, giving significance to special characters. |
| // See https://fuchsia.dev/fuchsia-src/reference/diagnostics/selectors for more information |
| RawSelector string `fidl_bounds:"1024" fidl_ordinal:"2"` |
| } |
| |
| func (_m *SelectorArgument) reset() { |
| switch _m.I_selectorArgumentTag { |
| case 1: |
| var _zeroed Selector |
| _m.StructuredSelector = _zeroed |
| case 2: |
| var _zeroed string |
| _m.RawSelector = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *SelectorArgument) Which() I_selectorArgumentTag { |
| switch _m.I_selectorArgumentTag { |
| case 1: |
| return SelectorArgumentStructuredSelector |
| case 2: |
| return SelectorArgumentRawSelector |
| default: |
| return SelectorArgument_unknownData |
| } |
| } |
| |
| func (_m *SelectorArgument) Ordinal() uint64 { |
| return uint64(_m.I_selectorArgumentTag) |
| } |
| |
| func (_m *SelectorArgument) SetStructuredSelector(structuredSelector Selector) { |
| _m.reset() |
| _m.I_selectorArgumentTag = SelectorArgumentStructuredSelector |
| _m.StructuredSelector = structuredSelector |
| } |
| |
| func SelectorArgumentWithStructuredSelector(structuredSelector Selector) SelectorArgument { |
| var _u SelectorArgument |
| _u.SetStructuredSelector(structuredSelector) |
| return _u |
| } |
| |
| func (_m *SelectorArgument) SetRawSelector(rawSelector string) { |
| _m.reset() |
| _m.I_selectorArgumentTag = SelectorArgumentRawSelector |
| _m.RawSelector = rawSelector |
| } |
| |
| func SelectorArgumentWithRawSelector(rawSelector string) SelectorArgument { |
| var _u SelectorArgument |
| _u.SetRawSelector(rawSelector) |
| return _u |
| } |
| func (_m *SelectorArgument) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_formattedContentTag uint64 |
| |
| const ( |
| FormattedContent_unknownData = 0 // 0x00000000 |
| FormattedContentJson = 1 // 0x00000001 |
| FormattedContentText = 2 // 0x00000002 |
| ) |
| |
| // A fidl union containing a complete hierarchy of structured diagnostics |
| // data, such that the content can be parsed into a file by itself. |
| type FormattedContent struct { |
| I_formattedContentTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"true"` |
| I_unknownData interface{} |
| // A diagnostics schema encoded as json. |
| // The VMO will contain up to 1mb of diagnostics data. |
| Json fuchsiamem.Buffer `fidl_ordinal:"1"` |
| // A diagnostics schema encoded as text. |
| // The VMO will contain up to 1mb of diagnostics data. |
| Text fuchsiamem.Buffer `fidl_ordinal:"2"` |
| } |
| |
| func (_m *FormattedContent) reset() { |
| switch _m.I_formattedContentTag { |
| case 1: |
| var _zeroed fuchsiamem.Buffer |
| _m.Json = _zeroed |
| case 2: |
| var _zeroed fuchsiamem.Buffer |
| _m.Text = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *FormattedContent) Which() I_formattedContentTag { |
| switch _m.I_formattedContentTag { |
| case 1: |
| return FormattedContentJson |
| case 2: |
| return FormattedContentText |
| default: |
| return FormattedContent_unknownData |
| } |
| } |
| |
| func (_m *FormattedContent) Ordinal() uint64 { |
| return uint64(_m.I_formattedContentTag) |
| } |
| |
| func (_m *FormattedContent) SetJson(json fuchsiamem.Buffer) { |
| _m.reset() |
| _m.I_formattedContentTag = FormattedContentJson |
| _m.Json = json |
| } |
| |
| func FormattedContentWithJson(json fuchsiamem.Buffer) FormattedContent { |
| var _u FormattedContent |
| _u.SetJson(json) |
| return _u |
| } |
| |
| func (_m *FormattedContent) SetText(text fuchsiamem.Buffer) { |
| _m.reset() |
| _m.I_formattedContentTag = FormattedContentText |
| _m.Text = text |
| } |
| |
| func FormattedContentWithText(text fuchsiamem.Buffer) FormattedContent { |
| var _u FormattedContent |
| _u.SetText(text) |
| return _u |
| } |
| func (_m *FormattedContent) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_clientSelectorConfigurationTag uint64 |
| |
| const ( |
| ClientSelectorConfiguration_unknownData = 0 // 0x00000000 |
| ClientSelectorConfigurationSelectors = 1 // 0x00000001 |
| ClientSelectorConfigurationSelectAll = 2 // 0x00000002 |
| ) |
| |
| type ClientSelectorConfiguration struct { |
| I_clientSelectorConfigurationTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // A vector of [fuchsia.diagnostics/SelectorArgument] which |
| // provide additional filters to scope data streams with. An empty vector is considered |
| // a misconfiguration and will result in an epitaph signaling incorrect parameters. |
| Selectors []SelectorArgument `fidl_bounds:"" fidl_ordinal:"1"` |
| // select_all must be true if set, and specifies that the client wants to retrieve |
| // all data that their connection is able to expose. |
| SelectAll bool `fidl_ordinal:"2"` |
| } |
| |
| func (_m *ClientSelectorConfiguration) reset() { |
| switch _m.I_clientSelectorConfigurationTag { |
| case 1: |
| var _zeroed []SelectorArgument |
| _m.Selectors = _zeroed |
| case 2: |
| var _zeroed bool |
| _m.SelectAll = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *ClientSelectorConfiguration) Which() I_clientSelectorConfigurationTag { |
| switch _m.I_clientSelectorConfigurationTag { |
| case 1: |
| return ClientSelectorConfigurationSelectors |
| case 2: |
| return ClientSelectorConfigurationSelectAll |
| default: |
| return ClientSelectorConfiguration_unknownData |
| } |
| } |
| |
| func (_m *ClientSelectorConfiguration) Ordinal() uint64 { |
| return uint64(_m.I_clientSelectorConfigurationTag) |
| } |
| |
| func (_m *ClientSelectorConfiguration) SetSelectors(selectors []SelectorArgument) { |
| _m.reset() |
| _m.I_clientSelectorConfigurationTag = ClientSelectorConfigurationSelectors |
| _m.Selectors = selectors |
| } |
| |
| func ClientSelectorConfigurationWithSelectors(selectors []SelectorArgument) ClientSelectorConfiguration { |
| var _u ClientSelectorConfiguration |
| _u.SetSelectors(selectors) |
| return _u |
| } |
| |
| func (_m *ClientSelectorConfiguration) SetSelectAll(selectAll bool) { |
| _m.reset() |
| _m.I_clientSelectorConfigurationTag = ClientSelectorConfigurationSelectAll |
| _m.SelectAll = selectAll |
| } |
| |
| func ClientSelectorConfigurationWithSelectAll(selectAll bool) ClientSelectorConfiguration { |
| var _u ClientSelectorConfiguration |
| _u.SetSelectAll(selectAll) |
| return _u |
| } |
| func (_m *ClientSelectorConfiguration) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_stringSelectorTag uint64 |
| |
| const ( |
| StringSelector_unknownData = 0 // 0x00000000 |
| StringSelectorStringPattern = 1 // 0x00000001 |
| StringSelectorExactMatch = 2 // 0x00000002 |
| ) |
| |
| // StringSelector is an union defining different ways to describe a pattern to match |
| // strings against. |
| type StringSelector struct { |
| I_stringSelectorTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // This is a provided string that defines a pattern to |
| // match against. The parser treats asterisks (*), colons (:) and backslashes |
| // (\) as special characters. |
| // |
| // If you wish to match against literal asterisks (*), they must be escaped. |
| // If you wish to match against literal backslashes (\), they must be escaped. |
| // If you wish to match against literal colons (:), they must be escaped. |
| // |
| // eg: abc will match any string with the exact name "abc". |
| // eg: a\* will match any string with the exact name "a*". |
| // eg: a\\* will match any that starts with exactly "a\". |
| // eg: a* will match any string that starts with "a". |
| // eg: a*b will match any string that starts with a and ends with b. |
| // eg: a*b*c will match any string that starts with a and ends with c, with `b` |
| // in the middle. |
| // |
| // In addition, the "**" literal is treated as a special sequence that may match |
| // multiple levels in a component selector only. See |ComponentSelector| for |
| // details. |
| StringPattern string `fidl_bounds:"100" fidl_ordinal:"1"` |
| // This is a provided string that defines an exact string to match against. No |
| // characters are treated as special, or carry special syntax. |
| ExactMatch string `fidl_bounds:"100" fidl_ordinal:"2"` |
| } |
| |
| func (_m *StringSelector) reset() { |
| switch _m.I_stringSelectorTag { |
| case 1: |
| var _zeroed string |
| _m.StringPattern = _zeroed |
| case 2: |
| var _zeroed string |
| _m.ExactMatch = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *StringSelector) Which() I_stringSelectorTag { |
| switch _m.I_stringSelectorTag { |
| case 1: |
| return StringSelectorStringPattern |
| case 2: |
| return StringSelectorExactMatch |
| default: |
| return StringSelector_unknownData |
| } |
| } |
| |
| func (_m *StringSelector) Ordinal() uint64 { |
| return uint64(_m.I_stringSelectorTag) |
| } |
| |
| func (_m *StringSelector) SetStringPattern(stringPattern string) { |
| _m.reset() |
| _m.I_stringSelectorTag = StringSelectorStringPattern |
| _m.StringPattern = stringPattern |
| } |
| |
| func StringSelectorWithStringPattern(stringPattern string) StringSelector { |
| var _u StringSelector |
| _u.SetStringPattern(stringPattern) |
| return _u |
| } |
| |
| func (_m *StringSelector) SetExactMatch(exactMatch string) { |
| _m.reset() |
| _m.I_stringSelectorTag = StringSelectorExactMatch |
| _m.ExactMatch = exactMatch |
| } |
| |
| func StringSelectorWithExactMatch(exactMatch string) StringSelector { |
| var _u StringSelector |
| _u.SetExactMatch(exactMatch) |
| return _u |
| } |
| func (_m *StringSelector) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| type I_treeSelectorTag uint64 |
| |
| const ( |
| TreeSelector_unknownData = 0 // 0x00000000 |
| TreeSelectorSubtreeSelector = 1 // 0x00000001 |
| TreeSelectorPropertySelector = 2 // 0x00000002 |
| ) |
| |
| // TreeSelector represents a selection request on a hierarchy of named nodes, with |
| // named properties on those nodes. |
| type TreeSelector struct { |
| I_treeSelectorTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // A selector defining a set of nodes to match, for which the entire subtree including |
| // those nodes are selected. |
| SubtreeSelector SubtreeSelector `fidl_ordinal:"1"` |
| // A selector defining a set of nodes to match, and on those matched nodes a set of named |
| // propperties to match. |
| PropertySelector PropertySelector `fidl_ordinal:"2"` |
| } |
| |
| func (_m *TreeSelector) reset() { |
| switch _m.I_treeSelectorTag { |
| case 1: |
| var _zeroed SubtreeSelector |
| _m.SubtreeSelector = _zeroed |
| case 2: |
| var _zeroed PropertySelector |
| _m.PropertySelector = _zeroed |
| default: |
| var _zeroed interface{} |
| _m.I_unknownData = _zeroed |
| } |
| } |
| |
| func (_m *TreeSelector) Which() I_treeSelectorTag { |
| switch _m.I_treeSelectorTag { |
| case 1: |
| return TreeSelectorSubtreeSelector |
| case 2: |
| return TreeSelectorPropertySelector |
| default: |
| return TreeSelector_unknownData |
| } |
| } |
| |
| func (_m *TreeSelector) Ordinal() uint64 { |
| return uint64(_m.I_treeSelectorTag) |
| } |
| |
| func (_m *TreeSelector) SetSubtreeSelector(subtreeSelector SubtreeSelector) { |
| _m.reset() |
| _m.I_treeSelectorTag = TreeSelectorSubtreeSelector |
| _m.SubtreeSelector = subtreeSelector |
| } |
| |
| func TreeSelectorWithSubtreeSelector(subtreeSelector SubtreeSelector) TreeSelector { |
| var _u TreeSelector |
| _u.SetSubtreeSelector(subtreeSelector) |
| return _u |
| } |
| |
| func (_m *TreeSelector) SetPropertySelector(propertySelector PropertySelector) { |
| _m.reset() |
| _m.I_treeSelectorTag = TreeSelectorPropertySelector |
| _m.PropertySelector = propertySelector |
| } |
| |
| func TreeSelectorWithPropertySelector(propertySelector PropertySelector) TreeSelector { |
| var _u TreeSelector |
| _u.SetPropertySelector(propertySelector) |
| return _u |
| } |
| func (_m *TreeSelector) GetUnknownData() _bindings.UnknownData { |
| return _m.I_unknownData.(_bindings.UnknownData) |
| } |
| |
| // Interest expresses the scope of clients' desired diagnostics data, |
| // e.g. for filtering messages or controlling their generation. |
| type Interest struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Minimum desired severity. Components should include records at or |
| // above this severity. |
| // |
| // If not present, interpreted as Severity.INFO. |
| MinSeverity Severity `fidl_ordinal:"1"` |
| MinSeverityPresent bool |
| } |
| |
| func (u *Interest) SetMinSeverity(minSeverity Severity) { |
| u.MinSeverity = minSeverity |
| u.MinSeverityPresent = true |
| } |
| |
| func (u *Interest) GetMinSeverity() Severity { |
| return u.MinSeverity |
| } |
| |
| func (u *Interest) GetMinSeverityWithDefault(_default Severity) Severity { |
| if !u.HasMinSeverity() { |
| return _default |
| } |
| return u.MinSeverity |
| } |
| |
| func (u *Interest) HasMinSeverity() bool { |
| return u.MinSeverityPresent |
| } |
| |
| func (u *Interest) ClearMinSeverity() { |
| u.MinSeverityPresent = false |
| } |
| |
| func (u *Interest) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *Interest) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Parameters which configure a diagnostics stream's performance properties. |
| type PerformanceConfiguration struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Maximum aggregate size of all formatted contents returned by |
| // the batch iterator for a diagnostics stream. If this value is set for a stream |
| // configured in subscribe mode, the stream will terminate when the max size has |
| // been reached. |
| // NOTE: OPTIONAL |
| MaxAggregateContentSizeBytes uint64 `fidl_ordinal:"1"` |
| MaxAggregateContentSizeBytesPresent bool |
| // Configuration specifying max number of seconds to wait for a single |
| // component to have its diagnostics data "pumped". This value can used |
| // for testing or if you know the component you are interested is in under |
| // heavy load. |
| // If not provided, then PER_COMPONENT_ASYNC_TIMEOUT_SECONDS as defined in |
| // https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/diagnostics/archivist/src/constants.rs |
| // will be used. |
| // NOTE: OPTIONAL |
| BatchRetrievalTimeoutSeconds int64 `fidl_ordinal:"2"` |
| BatchRetrievalTimeoutSecondsPresent bool |
| } |
| |
| func (u *PerformanceConfiguration) SetMaxAggregateContentSizeBytes(maxAggregateContentSizeBytes uint64) { |
| u.MaxAggregateContentSizeBytes = maxAggregateContentSizeBytes |
| u.MaxAggregateContentSizeBytesPresent = true |
| } |
| |
| func (u *PerformanceConfiguration) GetMaxAggregateContentSizeBytes() uint64 { |
| return u.MaxAggregateContentSizeBytes |
| } |
| |
| func (u *PerformanceConfiguration) GetMaxAggregateContentSizeBytesWithDefault(_default uint64) uint64 { |
| if !u.HasMaxAggregateContentSizeBytes() { |
| return _default |
| } |
| return u.MaxAggregateContentSizeBytes |
| } |
| |
| func (u *PerformanceConfiguration) HasMaxAggregateContentSizeBytes() bool { |
| return u.MaxAggregateContentSizeBytesPresent |
| } |
| |
| func (u *PerformanceConfiguration) ClearMaxAggregateContentSizeBytes() { |
| u.MaxAggregateContentSizeBytesPresent = false |
| } |
| |
| func (u *PerformanceConfiguration) SetBatchRetrievalTimeoutSeconds(batchRetrievalTimeoutSeconds int64) { |
| u.BatchRetrievalTimeoutSeconds = batchRetrievalTimeoutSeconds |
| u.BatchRetrievalTimeoutSecondsPresent = true |
| } |
| |
| func (u *PerformanceConfiguration) GetBatchRetrievalTimeoutSeconds() int64 { |
| return u.BatchRetrievalTimeoutSeconds |
| } |
| |
| func (u *PerformanceConfiguration) GetBatchRetrievalTimeoutSecondsWithDefault(_default int64) int64 { |
| if !u.HasBatchRetrievalTimeoutSeconds() { |
| return _default |
| } |
| return u.BatchRetrievalTimeoutSeconds |
| } |
| |
| func (u *PerformanceConfiguration) HasBatchRetrievalTimeoutSeconds() bool { |
| return u.BatchRetrievalTimeoutSecondsPresent |
| } |
| |
| func (u *PerformanceConfiguration) ClearBatchRetrievalTimeoutSeconds() { |
| u.BatchRetrievalTimeoutSecondsPresent = false |
| } |
| |
| func (u *PerformanceConfiguration) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *PerformanceConfiguration) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Parameters needed to configure a stream of diagnostics information. |
| type StreamParameters struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // A [fuchsia.diagnostics/DataType] that specifies the diagnostics data type |
| // to stream to the client. |
| // NOTE: REQUIRED |
| DataType DataType `fidl_ordinal:"1"` |
| DataTypePresent bool |
| // A [fuchsia.diagnostics/StreamMode] that specifies how the |
| // streaming server provides streamed results. |
| // NOTE: REQUIRED |
| StreamMode StreamMode `fidl_ordinal:"2"` |
| StreamModePresent bool |
| // A [fuchsia.diagnostics/Format] that specifies how to format the returned |
| // diagnostics data. |
| // NOTE: REQUIRED |
| Format Format `fidl_ordinal:"3"` |
| FormatPresent bool |
| // Configuration specifying what results the client wants returned from their |
| // connection. The client can request a specific subset of data using a vector |
| // of provided selectors, or can specify that they want all available data. |
| // NOTE: REQUIRED |
| ClientSelectorConfiguration ClientSelectorConfiguration `fidl_ordinal:"4"` |
| ClientSelectorConfigurationPresent bool |
| // Configuration specifying max number of seconds to wait for a single |
| // component to have its diagnostics data "pumped". This value can used |
| // for testing or if you know the component you are interested is in under |
| // heavy load. |
| // If not provided, then PER_COMPONENT_ASYNC_TIMEOUT_SECONDS as defined in |
| // https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/diagnostics/archivist/src/constants.rs |
| // will be used. |
| // NOTE: OPTIONAL |
| BatchRetrievalTimeoutSeconds int64 `fidl_ordinal:"5"` |
| BatchRetrievalTimeoutSecondsPresent bool |
| // Parameters which configure a diagnostics stream's performance properties. |
| // NOTE: OPTIONAL |
| PerformanceConfiguration PerformanceConfiguration `fidl_ordinal:"6"` |
| PerformanceConfigurationPresent bool |
| } |
| |
| func (u *StreamParameters) SetDataType(dataType DataType) { |
| u.DataType = dataType |
| u.DataTypePresent = true |
| } |
| |
| func (u *StreamParameters) GetDataType() DataType { |
| return u.DataType |
| } |
| |
| func (u *StreamParameters) GetDataTypeWithDefault(_default DataType) DataType { |
| if !u.HasDataType() { |
| return _default |
| } |
| return u.DataType |
| } |
| |
| func (u *StreamParameters) HasDataType() bool { |
| return u.DataTypePresent |
| } |
| |
| func (u *StreamParameters) ClearDataType() { |
| u.DataTypePresent = false |
| } |
| |
| func (u *StreamParameters) SetStreamMode(streamMode StreamMode) { |
| u.StreamMode = streamMode |
| u.StreamModePresent = true |
| } |
| |
| func (u *StreamParameters) GetStreamMode() StreamMode { |
| return u.StreamMode |
| } |
| |
| func (u *StreamParameters) GetStreamModeWithDefault(_default StreamMode) StreamMode { |
| if !u.HasStreamMode() { |
| return _default |
| } |
| return u.StreamMode |
| } |
| |
| func (u *StreamParameters) HasStreamMode() bool { |
| return u.StreamModePresent |
| } |
| |
| func (u *StreamParameters) ClearStreamMode() { |
| u.StreamModePresent = false |
| } |
| |
| func (u *StreamParameters) SetFormat(format Format) { |
| u.Format = format |
| u.FormatPresent = true |
| } |
| |
| func (u *StreamParameters) GetFormat() Format { |
| return u.Format |
| } |
| |
| func (u *StreamParameters) GetFormatWithDefault(_default Format) Format { |
| if !u.HasFormat() { |
| return _default |
| } |
| return u.Format |
| } |
| |
| func (u *StreamParameters) HasFormat() bool { |
| return u.FormatPresent |
| } |
| |
| func (u *StreamParameters) ClearFormat() { |
| u.FormatPresent = false |
| } |
| |
| func (u *StreamParameters) SetClientSelectorConfiguration(clientSelectorConfiguration ClientSelectorConfiguration) { |
| u.ClientSelectorConfiguration = clientSelectorConfiguration |
| u.ClientSelectorConfigurationPresent = true |
| } |
| |
| func (u *StreamParameters) GetClientSelectorConfiguration() ClientSelectorConfiguration { |
| return u.ClientSelectorConfiguration |
| } |
| |
| func (u *StreamParameters) GetClientSelectorConfigurationWithDefault(_default ClientSelectorConfiguration) ClientSelectorConfiguration { |
| if !u.HasClientSelectorConfiguration() { |
| return _default |
| } |
| return u.ClientSelectorConfiguration |
| } |
| |
| func (u *StreamParameters) HasClientSelectorConfiguration() bool { |
| return u.ClientSelectorConfigurationPresent |
| } |
| |
| func (u *StreamParameters) ClearClientSelectorConfiguration() { |
| u.ClientSelectorConfigurationPresent = false |
| } |
| |
| func (u *StreamParameters) SetBatchRetrievalTimeoutSeconds(batchRetrievalTimeoutSeconds int64) { |
| u.BatchRetrievalTimeoutSeconds = batchRetrievalTimeoutSeconds |
| u.BatchRetrievalTimeoutSecondsPresent = true |
| } |
| |
| func (u *StreamParameters) GetBatchRetrievalTimeoutSeconds() int64 { |
| return u.BatchRetrievalTimeoutSeconds |
| } |
| |
| func (u *StreamParameters) GetBatchRetrievalTimeoutSecondsWithDefault(_default int64) int64 { |
| if !u.HasBatchRetrievalTimeoutSeconds() { |
| return _default |
| } |
| return u.BatchRetrievalTimeoutSeconds |
| } |
| |
| func (u *StreamParameters) HasBatchRetrievalTimeoutSeconds() bool { |
| return u.BatchRetrievalTimeoutSecondsPresent |
| } |
| |
| func (u *StreamParameters) ClearBatchRetrievalTimeoutSeconds() { |
| u.BatchRetrievalTimeoutSecondsPresent = false |
| } |
| |
| func (u *StreamParameters) SetPerformanceConfiguration(performanceConfiguration PerformanceConfiguration) { |
| u.PerformanceConfiguration = performanceConfiguration |
| u.PerformanceConfigurationPresent = true |
| } |
| |
| func (u *StreamParameters) GetPerformanceConfiguration() PerformanceConfiguration { |
| return u.PerformanceConfiguration |
| } |
| |
| func (u *StreamParameters) GetPerformanceConfigurationWithDefault(_default PerformanceConfiguration) PerformanceConfiguration { |
| if !u.HasPerformanceConfiguration() { |
| return _default |
| } |
| return u.PerformanceConfiguration |
| } |
| |
| func (u *StreamParameters) HasPerformanceConfiguration() bool { |
| return u.PerformanceConfigurationPresent |
| } |
| |
| func (u *StreamParameters) ClearPerformanceConfiguration() { |
| u.PerformanceConfigurationPresent = false |
| } |
| |
| func (u *StreamParameters) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *StreamParameters) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Specifies a pattern of component relative monikers which |
| // identify components being selected for. |
| // |
| // Component selectors support wildcarding, which will glob a single "level" of a |
| // component moniker. eg: |
| // core/*/echo |
| // will match all echo instances running only in realms directly under core, but none |
| // nested further. |
| // |
| // Component selectors also support a recursive wildcard, which will glob multiple |
| // "levels" of a component moniker. eg: |
| // core/** |
| // will match all component instances running under core/ and all descendants of it. |
| // Note that the wildcard does not select core itself. Clients that wish to choose a |
| // subtree including the root should pass two selectors, eg: |
| // core |
| // core/** |
| // The recursive wildcard is only allowed as the final segment of the selector. |
| type ComponentSelector struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // Vector encoding the a pattern for monikers of components being selected for. |
| // These monikers are child-monikers relative to a "root" hierarchy that the archivist |
| // is aware of. |
| // |
| // There must be at least one StringSelector provided, which |
| // specifies the component names that are matched by |
| // the current selector. |
| MonikerSegments []StringSelector `fidl_bounds:"25" fidl_ordinal:"1"` |
| MonikerSegmentsPresent bool |
| } |
| |
| func (u *ComponentSelector) SetMonikerSegments(monikerSegments []StringSelector) { |
| u.MonikerSegments = monikerSegments |
| u.MonikerSegmentsPresent = true |
| } |
| |
| func (u *ComponentSelector) GetMonikerSegments() []StringSelector { |
| return u.MonikerSegments |
| } |
| |
| func (u *ComponentSelector) GetMonikerSegmentsWithDefault(_default []StringSelector) []StringSelector { |
| if !u.HasMonikerSegments() { |
| return _default |
| } |
| return u.MonikerSegments |
| } |
| |
| func (u *ComponentSelector) HasMonikerSegments() bool { |
| return u.MonikerSegmentsPresent |
| } |
| |
| func (u *ComponentSelector) ClearMonikerSegments() { |
| u.MonikerSegmentsPresent = false |
| } |
| |
| func (u *ComponentSelector) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *ComponentSelector) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| // Structured selector containing all required information for pattern-matching onto |
| // string-named properties owned by nodes in a data hierarchy, where data hierarchies belong |
| // to specific components. |
| // |
| // These selectors are represented in text form as three segments, colon delimited, |
| // specifying: |
| // <component_moniker>:<node_selector>:<property_selector> |
| // Examples: |
| // Property selection: |
| // realm1/realm2/echo.cmx:root/active_users:user_count |
| // |
| // Subtree selection: |
| // realm1/realm2/echo.cmx:root/active_users |
| type Selector struct { |
| _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v2:"16" fidl_alignment_v2:"8" fidl_resource:"false"` |
| I_unknownData interface{} |
| // The selector defining a pattern of component monikers to match |
| // against. |
| ComponentSelector ComponentSelector `fidl_ordinal:"1"` |
| ComponentSelectorPresent bool |
| // The selector defining data hierarchy properties to match against |
| // within the data hierarchies owned by components matched by |
| // `component_selector`. |
| TreeSelector TreeSelector `fidl_ordinal:"2"` |
| TreeSelectorPresent bool |
| } |
| |
| func (u *Selector) SetComponentSelector(componentSelector ComponentSelector) { |
| u.ComponentSelector = componentSelector |
| u.ComponentSelectorPresent = true |
| } |
| |
| func (u *Selector) GetComponentSelector() ComponentSelector { |
| return u.ComponentSelector |
| } |
| |
| func (u *Selector) GetComponentSelectorWithDefault(_default ComponentSelector) ComponentSelector { |
| if !u.HasComponentSelector() { |
| return _default |
| } |
| return u.ComponentSelector |
| } |
| |
| func (u *Selector) HasComponentSelector() bool { |
| return u.ComponentSelectorPresent |
| } |
| |
| func (u *Selector) ClearComponentSelector() { |
| u.ComponentSelectorPresent = false |
| } |
| |
| func (u *Selector) SetTreeSelector(treeSelector TreeSelector) { |
| u.TreeSelector = treeSelector |
| u.TreeSelectorPresent = true |
| } |
| |
| func (u *Selector) GetTreeSelector() TreeSelector { |
| return u.TreeSelector |
| } |
| |
| func (u *Selector) GetTreeSelectorWithDefault(_default TreeSelector) TreeSelector { |
| if !u.HasTreeSelector() { |
| return _default |
| } |
| return u.TreeSelector |
| } |
| |
| func (u *Selector) HasTreeSelector() bool { |
| return u.TreeSelectorPresent |
| } |
| |
| func (u *Selector) ClearTreeSelector() { |
| u.TreeSelectorPresent = false |
| } |
| |
| func (u *Selector) HasUnknownData() bool { |
| return u.I_unknownData != nil |
| } |
| |
| func (u *Selector) GetUnknownData() map[uint64]_bindings.UnknownData { |
| return u.I_unknownData.(map[uint64]_bindings.UnknownData) |
| } |
| |
| const ( |
| ArchiveAccessorStreamDiagnosticsOrdinal uint64 = 0x20c73e2ecd653c3e |
| ) |
| |
| type ArchiveAccessorWithCtxInterface _bindings.ChannelProxy |
| |
| // Creates an iterator over diagnostics data on the system. |
| // * The iterator may be finite by streaming in SNAPSHOT mode, serving only the |
| // current state of diagnostics data on the system. |
| // * The iterator may be infinite by streaming in either SNAPSHOT_THEN_SUBSCRIBE |
| // or SUBSCRIBE mode; the prior first provides iteration over the current state of |
| // the sytem, and then both provide ongoing iteration over newly arriving diagnostics |
| // data. |
| // |
| // + request `result stream` a [fuchsia.diagnostics/BatchIterator] that diagnostic |
| // records are exposed to the client over. |
| // * epitaphs: |
| // - INVALID_ARGS: A required argument in the StreamParameters struct was missing. |
| // - WRONG_TYPE: A selector provided by the StreamParameters struct was incorrectly |
| // formatted. |
| // |
| // + request `stream_parameters` is a [fuchsia.diagnostics/StreamParameter] which |
| // specifies how to configure the stream. |
| func (p *ArchiveAccessorWithCtxInterface) StreamDiagnostics(ctx_ _bindings.Context, streamParameters StreamParameters, resultStream BatchIteratorWithCtxInterfaceRequest) error { |
| req_ := &archiveAccessorWithCtxStreamDiagnosticsRequest{ |
| StreamParameters: streamParameters, |
| ResultStream: resultStream, |
| } |
| err_ := ((*_bindings.ChannelProxy)(p)).Send(ArchiveAccessorStreamDiagnosticsOrdinal, req_) |
| return err_ |
| } |
| |
| // Outer protocol for interacting with the different diagnostics data sources. |
| type ArchiveAccessorWithCtx interface { |
| // Creates an iterator over diagnostics data on the system. |
| // * The iterator may be finite by streaming in SNAPSHOT mode, serving only the |
| // current state of diagnostics data on the system. |
| // * The iterator may be infinite by streaming in either SNAPSHOT_THEN_SUBSCRIBE |
| // or SUBSCRIBE mode; the prior first provides iteration over the current state of |
| // the sytem, and then both provide ongoing iteration over newly arriving diagnostics |
| // data. |
| // |
| // + request `result stream` a [fuchsia.diagnostics/BatchIterator] that diagnostic |
| // records are exposed to the client over. |
| // * epitaphs: |
| // - INVALID_ARGS: A required argument in the StreamParameters struct was missing. |
| // - WRONG_TYPE: A selector provided by the StreamParameters struct was incorrectly |
| // formatted. |
| // |
| // + request `stream_parameters` is a [fuchsia.diagnostics/StreamParameter] which |
| // specifies how to configure the stream. |
| StreamDiagnostics(ctx_ _bindings.Context, streamParameters StreamParameters, resultStream BatchIteratorWithCtxInterfaceRequest) error |
| } |
| |
| type ArchiveAccessorWithCtxTransitionalBase struct{} |
| |
| type ArchiveAccessorWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewArchiveAccessorWithCtxInterfaceRequest() (ArchiveAccessorWithCtxInterfaceRequest, *ArchiveAccessorWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return ArchiveAccessorWithCtxInterfaceRequest(req), (*ArchiveAccessorWithCtxInterface)(cli), err |
| } |
| |
| // Implements ServiceRequest. |
| func (_ ArchiveAccessorWithCtxInterfaceRequest) Name() string { |
| return "fuchsia.diagnostics.ArchiveAccessor" |
| } |
| func (c ArchiveAccessorWithCtxInterfaceRequest) ToChannel() _zx.Channel { |
| return c.Channel |
| } |
| |
| const ArchiveAccessorName = "fuchsia.diagnostics.ArchiveAccessor" |
| |
| type ArchiveAccessorWithCtxStub struct { |
| Impl ArchiveAccessorWithCtx |
| } |
| |
| func (s_ *ArchiveAccessorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case ArchiveAccessorStreamDiagnosticsOrdinal: |
| in_ := archiveAccessorWithCtxStreamDiagnosticsRequest{} |
| marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx) |
| if !ok { |
| return nil, false, _bindings.ErrMissingMarshalerContext |
| } |
| if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil { |
| return nil, false, err_ |
| } |
| err_ := s_.Impl.StreamDiagnostics(args_.Ctx, in_.StreamParameters, in_.ResultStream) |
| return nil, false, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type ArchiveAccessorEventProxy _bindings.ChannelProxy |
| |
| const ( |
| BatchIteratorGetNextOrdinal uint64 = 0x781986486c6254a5 |
| ) |
| |
| type BatchIteratorWithCtxInterface _bindings.ChannelProxy |
| |
| // Returns a vector of [fuchsia.diagnostics/FormattedContent] structs |
| // with a format dictated by the format_settings argument provided to the Reader protocol |
| // which spawned this BatchIterator. |
| // |
| // An empty vector implies that the data hierarchy has been fully iterated, and subsequent |
| // GetNext calls will always return the empty vector. |
| // |
| // When the BatchIterator is serving results via subscription model, calls to GetNext will |
| // hang until there is new data available, it will not return an empty vector. |
| // |
| // - returns a vector of FormattedContent structs. Clients connected to a |
| // Batch are expected to call GetNext() until an empty vector |
| // is returned, denoting that the entire data hierarchy has been read. |
| // |
| // * error a [fuchsia.diagnostics/ReaderError] |
| // value indicating that there was an issue reading the underlying data hierarchies |
| // or formatting those hierarchies to populate the `batch`. Note, these |
| // issues do not include a single component's data hierarchy failing to be read. |
| // The iterator is tolerant of individual component data sources failing to be read, |
| // whether that failure is a timeout or a malformed binary file. |
| // In the event that a GetNext call fails, that subset of the data hierarchy results is |
| // dropped, but future calls to GetNext will provide new subsets of |
| // FormattedDataHierarchies. |
| func (p *BatchIteratorWithCtxInterface) GetNext(ctx_ _bindings.Context) (BatchIteratorGetNextResult, error) { |
| var req_ _bindings.Message |
| resp_ := &batchIteratorWithCtxGetNextResponse{} |
| err_ := ((*_bindings.ChannelProxy)(p)).Call(BatchIteratorGetNextOrdinal, req_, resp_) |
| return resp_.Result, err_ |
| } |
| |
| // Conceptually, a directory iterator, where each element in the iterator is a single |
| // complete file that can be concatenated with other results. |
| type BatchIteratorWithCtx interface { |
| // Returns a vector of [fuchsia.diagnostics/FormattedContent] structs |
| // with a format dictated by the format_settings argument provided to the Reader protocol |
| // which spawned this BatchIterator. |
| // |
| // An empty vector implies that the data hierarchy has been fully iterated, and subsequent |
| // GetNext calls will always return the empty vector. |
| // |
| // When the BatchIterator is serving results via subscription model, calls to GetNext will |
| // hang until there is new data available, it will not return an empty vector. |
| // |
| // - returns a vector of FormattedContent structs. Clients connected to a |
| // Batch are expected to call GetNext() until an empty vector |
| // is returned, denoting that the entire data hierarchy has been read. |
| // |
| // * error a [fuchsia.diagnostics/ReaderError] |
| // value indicating that there was an issue reading the underlying data hierarchies |
| // or formatting those hierarchies to populate the `batch`. Note, these |
| // issues do not include a single component's data hierarchy failing to be read. |
| // The iterator is tolerant of individual component data sources failing to be read, |
| // whether that failure is a timeout or a malformed binary file. |
| // In the event that a GetNext call fails, that subset of the data hierarchy results is |
| // dropped, but future calls to GetNext will provide new subsets of |
| // FormattedDataHierarchies. |
| GetNext(ctx_ _bindings.Context) (BatchIteratorGetNextResult, error) |
| } |
| |
| type BatchIteratorWithCtxTransitionalBase struct{} |
| |
| type BatchIteratorWithCtxInterfaceRequest _bindings.InterfaceRequest |
| |
| func NewBatchIteratorWithCtxInterfaceRequest() (BatchIteratorWithCtxInterfaceRequest, *BatchIteratorWithCtxInterface, error) { |
| req, cli, err := _bindings.NewInterfaceRequest() |
| return BatchIteratorWithCtxInterfaceRequest(req), (*BatchIteratorWithCtxInterface)(cli), err |
| } |
| |
| type BatchIteratorWithCtxStub struct { |
| Impl BatchIteratorWithCtx |
| } |
| |
| func (s_ *BatchIteratorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) { |
| switch args_.Ordinal { |
| case BatchIteratorGetNextOrdinal: |
| result, err_ := s_.Impl.GetNext(args_.Ctx) |
| out_ := batchIteratorWithCtxGetNextResponse{} |
| out_.Result = result |
| return &out_, true, err_ |
| } |
| return nil, false, _bindings.ErrUnknownOrdinal |
| } |
| |
| type BatchIteratorEventProxy _bindings.ChannelProxy |