From 39e7f7b8c10ee6d0f0d60282248efebb5f36a0bf Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Fri, 22 Dec 2023 16:19:45 +0100 Subject: [PATCH] Cleanup documentation --- Sources/Hummingbird/Exports.swift | 20 +++++++++---------- .../Hummingbird/Server/ServiceContext.swift | 18 ++++++++--------- Sources/HummingbirdJobs/Exports.swift | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Sources/Hummingbird/Exports.swift b/Sources/Hummingbird/Exports.swift index c462ae026..8ff328eb2 100644 --- a/Sources/Hummingbird/Exports.swift +++ b/Sources/Hummingbird/Exports.swift @@ -24,14 +24,14 @@ @_exported import struct HummingbirdCore.TSTLSOptions #endif -@_exported import struct NIOCore.ByteBuffer -@_exported import struct NIOCore.ByteBufferAllocator -@_exported import protocol NIOCore.EventLoop -@_exported import class NIOCore.EventLoopFuture -@_exported import protocol NIOCore.EventLoopGroup -@_exported import enum NIOCore.SocketAddress -@_exported import struct NIOCore.TimeAmount +@_exported @_documentation(visibility: internal) import struct NIOCore.ByteBuffer +@_exported @_documentation(visibility: internal) import struct NIOCore.ByteBufferAllocator +@_exported @_documentation(visibility: internal) import protocol NIOCore.EventLoop +@_exported @_documentation(visibility: internal) import class NIOCore.EventLoopFuture +@_exported @_documentation(visibility: internal) import protocol NIOCore.EventLoopGroup +@_exported @_documentation(visibility: internal) import enum NIOCore.SocketAddress +@_exported @_documentation(visibility: internal) import struct NIOCore.TimeAmount -@_exported import struct NIOHTTP1.HTTPHeaders -@_exported import enum NIOHTTP1.HTTPMethod -@_exported import enum NIOHTTP1.HTTPResponseStatus +@_exported @_documentation(visibility: internal) import struct NIOHTTP1.HTTPHeaders +@_exported @_documentation(visibility: internal) import enum NIOHTTP1.HTTPMethod +@_exported @_documentation(visibility: internal) import enum NIOHTTP1.HTTPResponseStatus diff --git a/Sources/Hummingbird/Server/ServiceContext.swift b/Sources/Hummingbird/Server/ServiceContext.swift index 9092c8d20..3aae848f1 100644 --- a/Sources/Hummingbird/Server/ServiceContext.swift +++ b/Sources/Hummingbird/Server/ServiceContext.swift @@ -42,7 +42,7 @@ extension HBRequest { return try operation(request) } - /// Execute the given operation within a newly created ``Span`` + /// Execute the given operation within a newly created `Span` /// /// Calls operation with edited request that includes the serviceContext from span, and the span Be sure to use the /// `HBRequest` passed to the closure as that includes the serviceContext @@ -55,7 +55,7 @@ extension HBRequest { /// /// - Parameters: /// - operationName: The name of the operation being traced. This may be a handler function, database call, ... - /// - kind: The ``SpanKind`` of the ``Span`` to be created. Defaults to ``SpanKind/internal``. + /// - kind: The `SpanKind` of the `Span` to be created. Defaults to `SpanKind/internal`. /// - operation: operation to wrap in a span start/end and execute immediately /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) @@ -67,7 +67,7 @@ extension HBRequest { return try self.withSpan(operationName, context: self.serviceContext, ofKind: kind, operation) } - /// Execute a specific task within a newly created ``Span``. + /// Execute a specific task within a newly created `Span`. /// /// Calls operation with edited request that includes the serviceContext, and the span Be sure to use the /// `HBRequest` passed to the closure as that includes the serviceContext @@ -80,8 +80,8 @@ extension HBRequest { /// /// - Parameters: /// - operationName: The name of the operation being traced. This may be a handler function, database call, ... - /// - serviceContext: ServiceContext potentially containing trace identifiers of a parent ``Span``. - /// - kind: The ``SpanKind`` of the ``Span`` to be created. Defaults to ``SpanKind/internal``. + /// - serviceContext: ServiceContext potentially containing trace identifiers of a parent `Span`. + /// - kind: The `SpanKind` of the `Span` to be created. Defaults to `SpanKind/internal`. /// - operation: operation to wrap in a span start/end and execute immediately /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) @@ -103,7 +103,7 @@ extension HBRequest { } } - /// Execute the given operation within a newly created ``Span`` + /// Execute the given operation within a newly created `Span` /// /// Calls operation with edited request that includes the serviceContext from span, and the span. Be sure to use the /// `HBRequest` passed to the closure as that includes the serviceContext @@ -112,7 +112,7 @@ extension HBRequest { /// /// - Parameters: /// - operationName: The name of the operation being traced. This may be a handler function, database call, ... - /// - kind: The ``SpanKind`` of the ``Span`` to be created. Defaults to ``SpanKind/internal``. + /// - kind: The `SpanKind` of the `Span` to be created. Defaults to `SpanKind/internal`. /// - operation: operation to wrap in a span start/end and execute immediately /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) @@ -124,7 +124,7 @@ extension HBRequest { return self.withSpan(operationName, context: self.serviceContext, ofKind: kind, operation) } - /// Execute the given operation within a newly created ``Span``, + /// Execute the given operation within a newly created `Span`, /// /// Calls operation with edited request that includes the serviceContext, and the span. Be sure to use the /// `HBRequest` passed to the closure as that includes the serviceContext @@ -133,7 +133,7 @@ extension HBRequest { /// /// - Parameters: /// - operationName: The name of the operation being traced. This may be a handler function, database call, ... - /// - kind: The ``SpanKind`` of the ``Span`` to be created. Defaults to ``SpanKind/internal``. + /// - kind: The `SpanKind` of the `Span` to be created. Defaults to `SpanKind/internal`. /// - operation: operation to wrap in a span start/end and execute immediately /// - Returns: the value returned by `operation` /// - Throws: the error the `operation` has thrown (if any) diff --git a/Sources/HummingbirdJobs/Exports.swift b/Sources/HummingbirdJobs/Exports.swift index 33702b015..e0b216ce1 100644 --- a/Sources/HummingbirdJobs/Exports.swift +++ b/Sources/HummingbirdJobs/Exports.swift @@ -12,4 +12,4 @@ // //===----------------------------------------------------------------------===// -@_exported import struct Logging.Logger +@_exported @_documentation(visibility: internal) import struct Logging.Logger