protected function getShardIds(): array
    {
        $key = $this->getStreamName() . '.shard_ids';

        if ($this->cache->has($key)) {
            return $this->cache->get($key);
        }

        $res = $this->getClient()->describeStream(['StreamName' => $this->getStreamName()]);
        $shard_ids = $res->search('StreamDescription.Shards[].ShardId');
        // Cache shard_ids for a day as overuse of the describeStream
        // resource results in LimitExceededException error.
        $this->cache->set($key, $shard_ids, 86400);

        return $shard_ids;
    }
protected function getShardIds(): array
    {
        $key = $this->getStreamName() . '.shard_ids';

        if ($this->cache->has($key)) {
            return $this->cache->get($key);
        }

        $res = $this->getClient()->describeStream(['StreamName' => $this->getStreamName()]);
        $shard_ids = $res->search('StreamDescription.Shards[].ShardId');
        // Cache shard_ids for a day as overuse of the describeStream
        // resource results in LimitExceededException error.
        $this->cache->set($key, $shard_ids, 86400);

        return $shard_ids;
    }
protected function getShardIds ( ) : array { $ key = $ this -> getStreamName ( ) . '.shard_ids' ; if ( $ this -> cache -> has ( $ key ) ) { return $ this -> cache -> get ( $ key ) ; } $ res = $ this -> getClient ( ) -> describeStream ( [ 'StreamName' => $ this -> getStreamName ( ) ] ) ; $ shard_ids = $ res -> search ( 'StreamDescription.Shards[].ShardId' ) ; // Cache shard_ids for a day as overuse of the describeStream // resource results in LimitExceededException error. $ this -> cache -> set ( $ key , $ shard_ids , 86400 ) ; return $ shard_ids ; }
Gets shard ids.

@return int[]
List of shard ids within the stream.
Gets shard ids .