MCPcopy Create free account

hub / github.com/IBM/sarama / functions

Functions3,668 in github.com/IBM/sarama

↓ 273 callersMethodError
(...any)
mockresponses.go:12
↓ 261 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
↓ 254 callersMethodErrorf
(string, ...any)
mocks/mocks.go:27
↓ 245 callersMethodFatal
(...any)
mockresponses.go:14
↓ 212 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
↓ 210 callersMethodClose
Close terminates the broker blocking until it stops internal goroutines and releases all resources.
mockbroker.go:148
↓ 202 callersMethodAddr
Addr returns the broker connection string in the form "<address>:<port>".
mockbroker.go:142
↓ 193 callersMethodBrokerID
BrokerID returns broker ID assigned to the broker.
mockbroker.go:120
↓ 152 callersMethodputEmptyTaggedFieldArray
()
packet_encoder.go:37
↓ 149 callersMethodIs
(target error)
errors.go:133
↓ 149 callersMethodgetEmptyTaggedFieldArray
()
packet_decoder.go:28
↓ 121 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
↓ 119 callersFunctionsafeClose
(t testing.TB, c io.Closer)
helpers_test.go:11
↓ 113 callersFunctionNewMockMetadataResponse
(t TestReporter)
mockresponses.go:144
↓ 113 callersMethodSetBroker
(addr string, brokerID int32)
mockresponses.go:168
↓ 108 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
↓ 103 callersMethodPrintf
(format string, v ...any)
sarama.go:129
↓ 103 callersMethodRun
(addr string)
examples/http_server/http_server.go:108
↓ 100 callersMethodputArrayLength
(in int)
packet_encoder.go:21
↓ 97 callersMethodgetArrayLength
()
packet_decoder.go:24
↓ 90 callersMethodputString
(in string)
packet_encoder.go:31
↓ 89 callersMethodgetString
()
packet_decoder.go:36
↓ 88 callersFunctionNewClusterAdmin
NewClusterAdmin creates a new ClusterAdmin using the given broker addresses and configuration.
admin.go:214
↓ 86 callersFunctiontestRequest
(t *testing.T, name string, rb protocolBody, expected []byte)
request_test.go:596
↓ 85 callersMethodencode
(pe packetEncoder)
encoder_decoder.go:12
↓ 81 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:177
↓ 80 callersMethodReturns
(e encoderWithHeader)
mockbroker.go:469
↓ 79 callersMethodAddBroker
testing API
metadata_response.go:400
↓ 79 callersMethodHelper
()
mockresponses.go:16
↓ 75 callersMethodFatalf
(string, ...any)
mockresponses.go:15
↓ 74 callersMethodSetController
(brokerID int32)
mockresponses.go:173
↓ 73 callersMethodClose
Close shuts down the admin and closes underlying client.
admin.go:205
↓ 70 callersFunctionNewFunctionalTestConfig
NewFunctionalTestConfig returns a config meant to be used by functional tests.
functional_test.go:97
↓ 70 callersMethodputInt32
(in int32)
packet_encoder.go:16
↓ 69 callersMethodgetInt32
()
packet_decoder.go:19
↓ 68 callersMethodAdd
Add appends elem, growing the buffer if it is full.
internal/queue/queue.go:36
↓ 68 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
↓ 68 callersFunctiontestVersionDecodable
(t *testing.T, name string, out versionedDecoder, in []byte, version int16)
request_test.go:588
↓ 64 callersMethodInput
Input is the input channel for the user to write messages to that they wish to send.
async_producer.go:54
↓ 62 callersFunctionsetupFunctionalTest
(t testing.TB)
functional_test.go:491
↓ 62 callersFunctionteardownFunctionalTest
(t testing.TB)
functional_test.go:496
↓ 58 callersMethodMessages
Messages returns the read channel for the messages that are returned by the broker.
consumer.go:399
↓ 57 callersMethoddecode
(pd packetDecoder)
encoder_decoder.go:61
↓ 54 callersFunctiontestResponse
(t *testing.T, name string, res protocolBody, expected []byte)
request_test.go:652
↓ 53 callersMethodDone
Done should return true when the SCRAM conversation is over.
broker.go:128
↓ 53 callersMethodgetNullableString
()
packet_decoder.go:37
↓ 52 callersFunctionNewAsyncProducer
NewAsyncProducer creates a new AsyncProducer using the given broker addresses and configuration.
async_producer.go:283
↓ 52 callersMethodputNullableString
(in *string)
packet_encoder.go:32
↓ 50 callersMethodAddTopicPartition
testing API
offset_response.go:257
↓ 50 callersMethodversion
()
request.go:13
↓ 49 callersMethodPrintln
(v ...any)
sarama.go:130
↓ 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 callersMethodSetLeader
(topic string, partition, brokerID int32)
mockresponses.go:158
↓ 48 callersMethodgetKError
()
packet_decoder.go:26
↓ 47 callersMethodID
ID returns the broker ID retrieved from Kafka's metadata, or -1 if that is not known.
broker.go:427
↓ 47 callersFunctioncheckKafkaVersion
(t testing.TB, requiredVersion string)
functional_test.go:451
↓ 47 callersMethodputKError
(in KError)
packet_encoder.go:23
↓ 45 callersMethodsendAndReceive
(req protocolBody, res protocolBody)
broker.go:1212
↓ 41 callersFunctionNewConsumer
NewConsumer creates a new consumer using the given broker addresses and configuration.
consumer.go:116
↓ 36 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:189
↓ 36 callersMethodString
()
utils.go:352
↓ 35 callersMethodLen
()
utils.go:22
↓ 34 callersMethodSetOffset
(topic string, partition int32, time, offset int64)
mockresponses.go:236
↓ 33 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:405
↓ 31 callersMethodName
Name uniquely identifies the strategy.
balance_strategy.go:52
↓ 31 callersFunctionNewMockOffsetResponse
(t TestReporter)
mockresponses.go:229
↓ 31 callersFunctionencode
Encode takes an Encoder and turns it into bytes while potentially recording metrics.
encoder_decoder.go:21
↓ 31 callersMethodputDurationMs
(in time.Duration)
packet_encoder.go:24
↓ 31 callersMethodputInt64
(in int64)
packet_encoder.go:17
↓ 30 callersMethodgetDurationMs
()
packet_decoder.go:27
↓ 29 callersMethodgetInt64
()
packet_decoder.go:20
↓ 28 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:26
↓ 27 callersMethodAddr
Addr returns the broker address as either retrieved from Kafka's metadata or passed to NewBroker.
broker.go:432
↓ 27 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
↓ 27 callersMethodSetError
(topic string, partition int32, kerror KError)
mockresponses.go:570
↓ 27 callersFunctionnewTestReporterMock
()
mocks/async_producer_test.go:32
↓ 26 callersFunctioncloseProducer
(t *testing.T, p AsyncProducer)
helpers_test.go:62
↓ 26 callersMethodputInt16
(in int16)
packet_encoder.go:15
↓ 26 callersMethodretryOnError
retryOnError will repeatedly call the given (error-returning) func in the case that its response is non-nil and retryable (as determined by the provid
admin.go:296
↓ 25 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:416
↓ 25 callersMethodStop
()
functional_consumer_group_test.go:512
↓ 24 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:156
↓ 24 callersMethodPlan
Plan implements BalanceStrategy.
balance_strategy.go:234
↓ 24 callersMethodgetInt16
()
packet_decoder.go:18
↓ 24 callersMethodputInt8
Primitives
packet_encoder.go:14
↓ 23 callersMethodBrokers
Brokers returns the current set of active brokers as retrieved from cluster metadata.
client.go:39
↓ 23 callersMethodConfig
Config returns the Config struct of the client. This struct should not be altered after it has been created.
client.go:27
↓ 23 callersFunctionNewConfig
NewConfig returns a new configuration instance with sane defaults.
config.go:548
↓ 23 callersFunctionNewMockFindCoordinatorResponse
(t TestReporter)
mockresponses.go:451
↓ 23 callersMethodgetInt8
Primitives
packet_decoder.go:17
↓ 22 callersFunctionNewSyncProducer
NewSyncProducer creates a new SyncProducer using the given broker addresses and configuration.
sync_producer.go:77
↓ 22 callersMethodSetCoordinator
(coordinatorType CoordinatorType, group string, broker *MockBroker)
mockresponses.go:459
↓ 22 callersFunctionverifyPlanIsBalancedAndSticky
(t *testing.T, s *stickyBalanceStrategy, members map[string]ConsumerGroupMemberMetadata, plan BalanceStrategyP
balance_strategy_test.go:2174
↓ 21 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
↓ 21 callersFunctionexpectResults
(t *testing.T, p AsyncProducer, successCount, errorCount int)
async_producer_test.go:59
↓ 20 callersFunctionParseKafkaVersion
ParseKafkaVersion parses and returns kafka version or error from a string
utils.go:327
↓ 20 callersFunctionassertMessageOffset
(t *testing.T, msg *ConsumerMessage, expectedOffset int64)
consumer_test.go:2075
↓ 20 callersMethodgetBool
()
packet_decoder.go:25
↓ 20 callersMethodputBool
(in bool)
packet_encoder.go:22
↓ 20 callersMethodputUVarint
(in uint64)
packet_encoder.go:19
next →1–100 of 3,668, ranked by callers