Sha256: 1a4855a6dccf654b1e88fd33d864ec8bc1d15b108d74015229ad49a05ff76b56

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

module Discorb
  #
  # Represents a shard.
  class Shard
    #
    # Initializes a new shard.
    # @private
    #
    # @param [Discorb::Client] client The client.
    # @param [Integer] id The ID of the shard.
    # @param [Integer] count The number of shards.
    # @param [Integer] index The index of the shard.
    def initialize: (
      Discorb::Client client,
      Integer id,
      Integer count,
      Integer index
    ) -> void

    #
    # Starts the shard.
    #
    # @return [void]
    def start: -> void

    #
    # Stops the shard.
    #
    # @return [void]
    def close: -> void

    %a{pure}
    def inspect: -> String

    # @return [Integer] The ID of the shard.
    attr_reader id: Integer

    # @return [Thread] The thread of the shard.
    attr_reader thread: Thread

    # @return [Logger] The logger of the shard.
    attr_reader logger: Logger

    # @private
    # @return [Integer] The internal index of the shard.
    attr_reader index: Integer

    # @private
    attr_accessor status: untyped

    # @private
    attr_accessor connection: untyped

    # @private
    attr_accessor session_id: untyped

    # @private
    attr_accessor next_shard: untyped

    # @private
    attr_accessor main_task: untyped
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
discorb-0.20.0 sig/discorb/shard.rbs
discorb-0.19.0 sig/discorb/shard.rbs