MCPcopy Create free account

hub / github.com/IBM/sarama / functions

Functions3,900 in github.com/IBM/sarama

↓ 286 callersFunctionNewTestConfig
NewTestConfig returns a config meant to be used by tests. Due to inconsistencies with the request versions the clients send using the default Kafka ve
config_test.go:19
↓ 283 callersMethodError
(...any)
mockresponses.go:12
↓ 258 callersMethodErrorf
(string, ...any)
mocks/mocks.go:27
↓ 254 callersMethodFatal
(...any)
mockresponses.go:14
↓ 230 callersFunctionNewMockBroker
NewMockBroker launches a fake Kafka broker. It takes a TestReporter as provided by the test framework and a channel of responses to use. If an error
mockbroker.go:406
↓ 223 callersMethodClose
Close terminates the broker blocking until it stops internal goroutines and releases all resources.
mockbroker.go:148
↓ 219 callersMethodAddr
Addr returns the broker connection string in the form "<address>:<port>".
mockbroker.go:142
↓ 209 callersMethodBrokerID
BrokerID returns broker ID assigned to the broker.
mockbroker.go:120
↓ 164 callersMethodIs
(target error)
errors.go:138
↓ 158 callersMethodputEmptyTaggedFieldArray
()
packet_encoder.go:37
↓ 155 callersMethodgetEmptyTaggedFieldArray
()
packet_decoder.go:28
↓ 146 callersMethodRun
(addr string)
examples/http_server/http_server.go:108
↓ 132 callersMethodSetHandlerByMap
SetHandlerByMap defines mapping of Request types to MockResponses. When a request is received by the broker, it looks up the request type in the map a
mockbroker.go:88
↓ 130 callersFunctionsafeClose
(t testing.TB, c io.Closer)
helpers_test.go:11
↓ 120 callersMethodClose
Close shuts down all broker connections managed by this client. It is required to call this function before a client object passes out of scope, as it
client.go:124
↓ 118 callersFunctionNewMockMetadataResponse
(t TestReporter)
mockresponses.go:199
↓ 118 callersMethodSetBroker
(addr string, brokerID int32)
mockresponses.go:223
↓ 108 callersMethodHelper
()
mockresponses.go:16
↓ 106 callersMethodPrintf
(format string, v ...any)
sarama.go:131
↓ 103 callersMethodputArrayLength
(in int)
packet_encoder.go:21
↓ 99 callersMethodgetArrayLength
()
packet_decoder.go:24
↓ 94 callersFunctionNewClusterAdmin
NewClusterAdmin creates a new ClusterAdmin using the given broker addresses and configuration.
admin.go:214
↓ 93 callersMethodputString
(in string)
packet_encoder.go:31
↓ 92 callersMethodgetString
()
packet_decoder.go:36
↓ 90 callersFunctionNewClient
NewClient creates a new Client. It connects to one of the given broker addresses and uses that broker to automatically fetch metadata on the rest of t
client.go:179
↓ 89 callersMethodAddBroker
testing API
metadata_response.go:400
↓ 89 callersMethodencode
(pe packetEncoder)
encoder_decoder.go:12
↓ 87 callersFunctiontestRequest
(t *testing.T, name string, rb protocolBody, expected []byte)
request_test.go:595
↓ 82 callersMethodReturns
(e encoderWithHeader)
mockbroker.go:469
↓ 81 callersMethodFatalf
(string, ...any)
mockresponses.go:15
↓ 77 callersMethodSetController
(brokerID int32)
mockresponses.go:228
↓ 76 callersMethodAdd
Add appends elem, growing the buffer if it is full.
internal/queue/queue.go:36
↓ 76 callersFunctionNewFunctionalTestConfig
NewFunctionalTestConfig returns a config meant to be used by functional tests.
functional_test.go:98
↓ 75 callersMethodClose
Close shuts down the admin and closes underlying client.
admin.go:205
↓ 72 callersMethodputInt32
(in int32)
packet_encoder.go:16
↓ 71 callersMethodgetInt32
()
packet_decoder.go:19
↓ 70 callersMethodInput
Input is the input channel for the user to write messages to that they wish to send.
async_producer.go:55
↓ 69 callersMethodIsAtLeast
IsAtLeast return true if and only if the version it is called on is greater than or equal to the version passed in: V1.IsAtLeast(V2) // false V2.Is
utils.go:134
↓ 69 callersFunctiontestVersionDecodable
(t *testing.T, name string, out versionedDecoder, in []byte, version int16)
request_test.go:587
↓ 66 callersFunctionsetupFunctionalTest
(t testing.TB)
functional_test.go:502
↓ 66 callersFunctionteardownFunctionalTest
(t testing.TB)
functional_test.go:507
↓ 62 callersMethoddecode
(pd packetDecoder)
encoder_decoder.go:61
↓ 62 callersMethodversion
()
request.go:13
↓ 60 callersMethodMessages
Messages returns the read channel for the messages that are returned by the broker.
consumer.go:403
↓ 58 callersMethodDone
Done should return true when the SCRAM conversation is over.
broker.go:131
↓ 57 callersFunctionNewAsyncProducer
NewAsyncProducer creates a new AsyncProducer using the given broker addresses and configuration.
async_producer.go:284
↓ 57 callersFunctiontestResponse
(t *testing.T, name string, res protocolBody, expected []byte)
request_test.go:651
↓ 56 callersMethodAddTopicPartition
testing API
offset_response.go:257
↓ 55 callersMethodgetNullableString
()
packet_decoder.go:37
↓ 54 callersMethodputNullableString
(in *string)
packet_encoder.go:32
↓ 51 callersMethodID
ID returns the broker ID retrieved from Kafka's metadata, or -1 if that is not known.
broker.go:439
↓ 51 callersMethodSetLeader
(topic string, partition, brokerID int32)
mockresponses.go:213
↓ 51 callersFunctioncheckKafkaVersion
(t testing.TB, requiredVersion string)
functional_test.go:462
↓ 49 callersMethodPrintln
(v ...any)
sarama.go:132
↓ 49 callersMethodgetKError
()
packet_decoder.go:26
↓ 48 callersMethodConsumePartition
ConsumePartition creates a PartitionConsumer on the given topic/partition with the given offset. It will return an error if this Consumer is already c
consumer.go:68
↓ 48 callersMethodputKError
(in KError)
packet_encoder.go:23
↓ 46 callersMethodCleanup
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited but before the offsets are committed for the very last time.
consumer_group_session.go:522
↓ 46 callersMethodLen
()
utils.go:22
↓ 46 callersMethodsendAndReceive
(req protocolBody, res protocolBody)
broker.go:1250
↓ 44 callersMethodString
()
utils.go:352
↓ 42 callersFunctionencode
Encode takes an Encoder and turns it into bytes while potentially recording metrics.
encoder_decoder.go:21
↓ 41 callersFunctionNewConsumer
NewConsumer creates a new consumer using the given broker addresses and configuration.
consumer.go:116
↓ 38 callersMethodAddr
Addr returns the broker address as either retrieved from Kafka's metadata or passed to NewBroker.
broker.go:444
↓ 36 callersMethodErrors
Errors returns a read channel of errors that occurred during consuming, if enabled. By default, errors are logged and not returned over this channel.
consumer.go:409
↓ 35 callersMethodSetOffset
(topic string, partition int32, time, offset int64)
mockresponses.go:291
↓ 34 callersMethodName
Name uniquely identifies the strategy.
balance_strategy.go:52
↓ 32 callersMethodRefreshMetadata
RefreshMetadata takes a list of topics and queries the cluster to refresh the available metadata for those topics. If no topics are provided, it will
client.go:83
↓ 32 callersMethodputDurationMs
(in time.Duration)
packet_encoder.go:24
↓ 31 callersFunctionNewMockOffsetResponse
(t TestReporter)
mockresponses.go:284
↓ 31 callersMethodgetDurationMs
()
packet_decoder.go:27
↓ 31 callersMethodputInt64
(in int64)
packet_encoder.go:17
↓ 30 callersFunctionNewBroker
NewBroker creates and returns a Broker targeting the given host:port address. This does not attempt to actually connect, you have to call Open() for t
broker.go:159
↓ 29 callersMethodSendMessage
SendMessage produces a given message, and returns only when it either has succeeded or failed to produce. It will return the partition and the offset
sync_producer.go:31
↓ 29 callersMethodSetError
(topic string, partition int32, kerror KError)
mockresponses.go:625
↓ 29 callersMethodgetInt64
()
packet_decoder.go:20
↓ 29 callersFunctionnewTestReporterMock
()
mocks/async_producer_test.go:33
↓ 28 callersMethodStop
()
functional_consumer_group_test.go:554
↓ 28 callersFunctioncloseProducer
(t *testing.T, p AsyncProducer)
helpers_test.go:62
↓ 27 callersMethodOpen
Open tries to connect to the Broker if it is not already connected or connecting, but does not block waiting for the connection to complete. This mean
broker.go:192
↓ 26 callersFunctionNewConfig
NewConfig returns a new configuration instance with sane defaults.
config.go:562
↓ 26 callersMethodputInt16
(in int16)
packet_encoder.go:15
↓ 25 callersFunctionNewMockFindCoordinatorResponse
(t TestReporter)
mockresponses.go:506
↓ 25 callersMethodputInt8
Primitives
packet_encoder.go:14
↓ 24 callersFunctionNewSyncProducer
NewSyncProducer creates a new SyncProducer using the given broker addresses and configuration.
sync_producer.go:111
↓ 24 callersMethodPlan
Plan implements BalanceStrategy.
balance_strategy.go:234
↓ 24 callersMethodSetCoordinator
(coordinatorType CoordinatorType, group string, broker *MockBroker)
mockresponses.go:514
↓ 24 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
↓ 24 callersMethodgetInt16
()
packet_decoder.go:18
↓ 24 callersMethodgetInt8
Primitives
packet_decoder.go:17
↓ 22 callersMethodBrokers
Brokers returns the current set of active brokers as retrieved from cluster metadata.
client.go:39
↓ 22 callersFunctionNewTestConfig
NewTestConfig returns a config meant to be used by tests. Due to inconsistencies with the request versions the clients send using the default Kafka ve
mocks/mocks.go:103
↓ 22 callersFunctionexpectResults
(t *testing.T, p AsyncProducer, successCount, errorCount int)
async_producer_test.go:60
↓ 22 callersFunctionverifyPlanIsBalancedAndSticky
(t *testing.T, s *stickyBalanceStrategy, members map[string]ConsumerGroupMemberMetadata, plan BalanceStrategyP
balance_strategy_test.go:2182
↓ 21 callersMethodPartition
Partition takes a message and partition count and chooses a partition
partitioner.go:16
↓ 21 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:61
↓ 21 callersMethodgetBool
()
packet_decoder.go:25
↓ 21 callersMethodputBool
(in bool)
packet_encoder.go:22
↓ 21 callersFunctionversionedDecode
(buf []byte, in versionedDecoder, version int16, metricRegistry metrics.Registry)
encoder_decoder.go:95
↓ 20 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:353
next →1–100 of 3,900, ranked by callers