MCPcopy Create free account

hub / github.com/IBM/sarama / functions

Functions3,668 in github.com/IBM/sarama

↓ 19 callersMethodAddError
(topic string, partition int32, err KError)
fetch_response.go:585
↓ 19 callersMethodController
()
admin.go:246
↓ 19 callersMethodPartition
Partition takes a message and partition count and chooses a partition
partitioner.go:16
↓ 19 callersMethodSuccesses
Successes is the success output channel back to the user when Return.Successes is enabled. If Return.Successes is true, you MUST read from this channe
async_producer.go:60
↓ 19 callersFunctiondecode
decode takes bytes and a decoder and fills the fields of the decoder from the bytes, interpreted using Kafka's encoding rules.
encoder_decoder.go:75
↓ 19 callersFunctiontestEncodable
not specific to request tests, just helper functions for testing structures that implement the encoder or decoder interfaces that needed somewhere to
request_test.go:570
↓ 18 callersMethodGetBlock
(topic string, partition int32)
fetch_response.go:573
↓ 18 callersFunctionNewMockFetchResponse
(t TestReporter, batchSize int)
mockresponses.go:301
↓ 17 callersMethodLeader
Leader returns the broker object that is the leader of the current topic/partition, as determined by querying the cluster metadata.
client.go:57
↓ 17 callersFunctionNewMockSequence
(responses ...any)
mockresponses.go:48
↓ 17 callersMethodValidate
Validate checks a Config instance. It will return a ConfigurationError if the specified values don't make sense. nolint:gocyclo // This function's cy
config.go:623
↓ 17 callersMethodgetInt32Array
()
packet_decoder.go:38
↓ 17 callersMethodputInt32Array
(in []int32)
packet_encoder.go:34
↓ 17 callersFunctionsafeAddMessage
(t *testing.T, ps *produceSet, msg *ProducerMessage)
produce_set_test.go:22
↓ 16 callersMethodClose
Close closes the broker resources
broker.go:374
↓ 16 callersMethodClose
Close shuts down the producer and waits for any buffered messages to be flushed. You must call this function before a producer object passes out of sc
async_producer.go:50
↓ 16 callersMethodClosed
()
client.go:343
↓ 16 callersFunctionnewProduceSet
(parent *asyncProducer)
produce_set.go:25
↓ 16 callersFunctionversionedDecode
(buf []byte, in versionedDecoder, version int16, metricRegistry metrics.Registry)
encoder_decoder.go:95
↓ 15 callersMethodAddTopic
(topic string, err KError)
metadata_response.go:404
↓ 15 callersMethodConnected
Connected returns true if the broker is connected and false otherwise. If the broker is not connected but it had tried to connect, the error from that
broker.go:348
↓ 15 callersMethodErrors
Errors is the error output channel back to the user. You MUST read from this channel or the Producer will deadlock when the channel is full. Alternati
async_producer.go:66
↓ 15 callersFunctionNewSyncProducer
NewSyncProducer instantiates a new SyncProducer mock. The t argument should be the *testing.T instance of your test method. An error will be written t
mocks/sync_producer.go:33
↓ 15 callersMethodSetMessage
(topic string, partition int32, offset int64, msg Encoder)
mockresponses.go:311
↓ 15 callersMethodsetHandler
setHandler sets the specified function as the request handler. Whenever a mock broker reads a request from the wire it passes the request to the funct
mockbroker.go:164
↓ 15 callersFunctiontestFuncConsumerGroupID
--------------------------------------------------------------------
functional_consumer_group_test.go:303
↓ 14 callersMethodAddBlock
(topic string, partitionID int32, fetchOffset int64, maxBytes int32, leaderEpoch int32)
fetch_request.go:344
↓ 14 callersMethodClose
Close shuts down the consumer. It must be called after all child PartitionConsumers have already been closed.
consumer.go:76
↓ 14 callersMethodEncode
()
utils.go:67
↓ 14 callersMethodFor
(reqBody versionedDecoder)
mockresponses.go:23
↓ 14 callersFunctionNewAsyncProducerFromClient
NewAsyncProducerFromClient creates a new Producer using the given client. It is still necessary to call Close() on the underlying client when shutting
async_producer.go:293
↓ 14 callersMethodremaining
subsets
real_decoder.go:314
↓ 14 callersFunctionwithRecover
(fn func())
utils.go:40
↓ 13 callersMethodGet
(name string)
metrics.go:73
↓ 13 callersFunctionNewConsumer
NewConsumer returns a new mock Consumer instance. The t argument should be the *testing.T instance of your test method. An error will be written to it
mocks/consumer.go:25
↓ 13 callersFunctionWrap
(sentinel error, wrapped ...error)
errors.go:141
↓ 13 callersMethodgetBytes
Collections
packet_decoder.go:32
↓ 13 callersMethodputBytes
Collections
packet_encoder.go:27
↓ 13 callersMethodrefreshController
()
admin.go:254
↓ 12 callersMethodBeginTxn
BeginTxn mark current transaction as ready.
sync_producer.go:46
↓ 12 callersMethodClose
Close stops the ConsumerGroup and detaches any running sessions. It is required to call this function before the object passes out of scope, as it wil
consumer_group.go:71
↓ 12 callersMethodCoordinator
Coordinator returns the coordinating broker for a consumer group. It will return a locally cached value if it's available. You can call RefreshCoordin
client.go:95
↓ 12 callersFunctionNewMetadataRequest
(version KafkaVersion, topics []string)
metadata_request.go:26
↓ 12 callersFunctionencodeSubscriberPlan
(t *testing.T, assignments map[string][]int32)
balance_strategy_test.go:2285
↓ 12 callersMethodremaining
Subsets
packet_decoder.go:44
↓ 11 callersMethodClose
Close shuts down the producer; you must call this function before a producer object passes out of scope, as it may otherwise leak memory. You must cal
sync_producer.go:37
↓ 11 callersMethodDescribeTransactions
DescribeTransactions returns the current state of the given transactional ids, querying each transaction's coordinator. Requires Kafka 3.0.0.0 or high
admin_transactions.go:26
↓ 11 callersMethodHighWaterMarkOffset
HighWaterMarkOffset returns the high water mark offset of the partition, i.e. the offset that will be used for the next message that will be produced.
consumer.go:410
↓ 11 callersMethodManagePartition
ManagePartition creates a PartitionOffsetManager on the given topic/partition. It will return an error if this OffsetManager is already managing the g
offset_manager.go:16
↓ 11 callersFunctionNewAsyncProducer
NewAsyncProducer instantiates a new Producer mock. The t argument should be the *testing.T instance of your test method. An error will be written to i
mocks/async_producer.go:35
↓ 11 callersFunctionNewBalanceStrategyRange
-------------------------------------------------------------------- NewBalanceStrategyRange returns a range balance strategy, which is the default an
balance_strategy.go:129
↓ 11 callersFunctionNewConsumerGroup
NewConsumerGroup creates a new consumer group the given broker addresses and configuration.
consumer_group.go:119
↓ 11 callersMethodPartitions
Partitions returns the sorted list of all partition IDs for the given topic.
client.go:48
↓ 11 callersMethodempty
()
produce_set.go:357
↓ 11 callersMethodisPartial
()
records.go:122
↓ 11 callersFunctionnewPartitionMuter
()
async_producer.go:135
↓ 11 callersMethodnumRecords
()
records.go:100
↓ 11 callersMethodpop
()
packet_encoder.go:44
↓ 11 callersMethodpush
Stacks, see PushEncoder
packet_encoder.go:43
↓ 11 callersFunctiontestRequestEncode
(t *testing.T, name string, rb protocolBody, expected []byte)
request_test.go:613
↓ 11 callersFunctionverifyFullyBalanced
verify that the plan is fully balanced, assumes that all consumers can consume from the same set of topics
balance_strategy_test.go:2326
↓ 10 callersMethodAddTransaction
(transactionalID string, producerID int64, state string)
mockresponses.go:1681
↓ 10 callersMethodClose
Close implements the Close method from the sarama.Consumer interface. It will close all registered PartitionConsumer instances.
mocks/consumer.go:121
↓ 10 callersMethodCommit
Commit commits the offsets. This method can be used if AutoCommit.Enable is set to false.
offset_manager.go:26
↓ 10 callersMethodCommitTxn
CommitTxn commit current transaction.
sync_producer.go:49
↓ 10 callersMethodConsume
Consume joins a cluster of consumers for a given list of topics and starts a blocking ConsumerGroupSession through the ConsumerGroupHandler. The life
consumer_group.go:61
↓ 10 callersMethodContext
Context returns the session context.
consumer_group_session.go:52
↓ 10 callersMethodGetMetadata
GetMetadata send a metadata request and returns a metadata response or error
broker.go:448
↓ 10 callersMethodMarkOffset
MarkOffset marks the provided offset, alongside a metadata string that represents the state of the partition consumer at that point in time. The metad
offset_manager.go:613
↓ 10 callersFunctionNewClusterAdminFromClient
NewClusterAdminFromClient creates a new ClusterAdmin using the given client. Note that underlying client will also be closed on admin's Close() call.
admin.go:228
↓ 10 callersFunctionNewOffsetManagerFromClient
NewOffsetManagerFromClient creates a new OffsetManager from the given client. It is still necessary to call Close() on the underlying client when fini
offset_manager.go:56
↓ 10 callersMethodNextOffset
NextOffset returns the next offset that should be consumed for the managed partition, accompanied by metadata which can be used to reconstruct the sta
offset_manager.go:598
↓ 10 callersMethodRefreshCoordinator
RefreshCoordinator retrieves the coordinator for a consumer group and stores it in local cache. This function only works on Kafka 0.8.2 and higher.
client.go:99
↓ 10 callersMethodSetHandlerFuncByMap
SetHandlerFuncByMap defines mapping of Request types to RequestHandlerFunc. When a request is received by the broker, it looks up the request type in
mockbroker.go:103
↓ 10 callersFunctioninitPartitionOffsetManager
(t *testing.T, om OffsetManager, coordinator *MockBroker, initialOffset int64, metadata string, )
offset_manager_test.go:68
↓ 10 callersFunctionisRetriableControllerError
isRetriableControllerError returns `true` if the given error type unwraps to an `ErrNotController` or `EOF` response from Kafka
admin.go:260
↓ 10 callersMethodtransitionTo
Try to transition to a valid status and return an error otherwise.
transaction_manager.go:212
↓ 10 callersMethodunmute
unmute decrements the in-flight counter for all partitions in the set.
async_producer.go:238
↓ 9 callersMethodAddMessage
(topic string, partition int32, key, value Encoder, offset int64)
fetch_response.go:720
↓ 9 callersMethodAddTopicPartition
(topic string, partition, brokerID int32, replicas, isr []int32, offline []int32, err KError)
metadata_response.go:424
↓ 9 callersMethodAssertCleanShutdown
()
functional_consumer_group_test.go:461
↓ 9 callersMethodConsumePartition
Consumer interface implementation ConsumePartition implements the ConsumePartition method from the sarama.Consumer interface. Before you can start c
mocks/consumer.go:48
↓ 9 callersMethodExpectConsumePartition
ExpectConsumePartition will register a topic/partition, so you can set expectations on it. The registered PartitionConsumer will be returned, so you c
mocks/consumer.go:211
↓ 9 callersMethodListTransactions
ListTransactions lists the transactions known to the cluster, optionally filtered by state, producer id, or (Kafka 3.8.0.0+) minimum duration in milli
admin_transactions.go:32
↓ 9 callersFunctionNewMockApiVersionsResponse
(t TestReporter)
mockresponses.go:1479
↓ 9 callersMethodWaitForState
(expected int32)
functional_consumer_group_test.go:485
↓ 9 callersMethodgetStringArray
()
packet_decoder.go:41
↓ 9 callersFunctioninitOffsetManager
(t *testing.T, retention time.Duration)
offset_manager_test.go:62
↓ 9 callersFunctionmakeProduceSet
()
produce_set_test.go:11
↓ 9 callersMethodputStringArray
(in []string)
packet_encoder.go:33
↓ 9 callersFunctiontestDecodable
(t *testing.T, name string, out decoder, in []byte)
request_test.go:580
↓ 9 callersMethodtryMute
tryMute checks if any of the partitions in the given produceSet are already muted, returning false if they are, otherwise it reserves every partition
async_producer.go:178
↓ 8 callersMethodAddTopicPartition
Testing API
produce_response.go:463
↓ 8 callersMethodDescribeProducers
DescribeProducers lists the active producers for the given topic partitions, querying each partition's leader. Requires Kafka 2.8.0.0 or higher.
admin_transactions.go:21
↓ 8 callersMethodExpectInputAndSucceed
ExpectInputAndSucceed sets an expectation on the mock producer that a message will be provided on the input channel. The mock producer will handle the
mocks/async_producer.go:267
↓ 8 callersMethodHistory
History returns a slice of RequestResponse pairs in the order they were processed by the broker. Note that in case of multiple connections to the brok
mockbroker.go:128
↓ 8 callersFunctionNewMockDescribeTransactionsResponse
(t TestReporter)
mockresponses.go:1631
↓ 8 callersFunctionNewMockWrapper
(res encoderWithHeader)
mockresponses.go:36
↓ 8 callersFunctionNewRandomPartitioner
NewRandomPartitioner returns a Partitioner which chooses a random partition each time.
partitioner.go:99
↓ 8 callersMethodPort
Port returns the TCP port number the broker is listening for requests on.
mockbroker.go:137
← previousnext →101–200 of 3,668, ranked by callers