MCPcopy Create free account

hub / github.com/IBM/sarama / functions

Functions3,837 in github.com/IBM/sarama

↓ 278 callersMethodError
(...any)
mockresponses.go:12
↓ 275 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
↓ 249 callersMethodErrorf
(string, ...any)
mocks/mocks.go:27
↓ 243 callersMethodFatal
(...any)
mockresponses.go:14
↓ 221 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
↓ 215 callersMethodClose
Close terminates the broker blocking until it stops internal goroutines and releases all resources.
mockbroker.go:148
↓ 210 callersMethodAddr
Addr returns the broker connection string in the form "<address>:<port>".
mockbroker.go:142
↓ 199 callersMethodBrokerID
BrokerID returns broker ID assigned to the broker.
mockbroker.go:120
↓ 158 callersMethodputEmptyTaggedFieldArray
()
packet_encoder.go:37
↓ 155 callersMethodgetEmptyTaggedFieldArray
()
packet_decoder.go:28
↓ 153 callersMethodIs
(target error)
errors.go:133
↓ 127 callersMethodRun
(addr string)
examples/http_server/http_server.go:108
↓ 126 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
↓ 124 callersFunctionsafeClose
(t testing.TB, c io.Closer)
helpers_test.go:11
↓ 114 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
↓ 113 callersFunctionNewMockMetadataResponse
(t TestReporter)
mockresponses.go:191
↓ 113 callersMethodSetBroker
(addr string, brokerID int32)
mockresponses.go:215
↓ 104 callersMethodHelper
()
mockresponses.go:16
↓ 104 callersMethodPrintf
(format string, v ...any)
sarama.go:129
↓ 103 callersMethodputArrayLength
(in int)
packet_encoder.go:21
↓ 100 callersMethodgetArrayLength
()
packet_decoder.go:24
↓ 93 callersMethodputString
(in string)
packet_encoder.go:31
↓ 92 callersFunctionNewClusterAdmin
NewClusterAdmin creates a new ClusterAdmin using the given broker addresses and configuration.
admin.go:214
↓ 92 callersMethodgetString
()
packet_decoder.go:36
↓ 89 callersMethodencode
(pe packetEncoder)
encoder_decoder.go:12
↓ 87 callersFunctiontestRequest
(t *testing.T, name string, rb protocolBody, expected []byte)
request_test.go:600
↓ 86 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:178
↓ 84 callersMethodAddBroker
testing API
metadata_response.go:400
↓ 80 callersMethodReturns
(e encoderWithHeader)
mockbroker.go:469
↓ 75 callersMethodClose
Close shuts down the admin and closes underlying client.
admin.go:205
↓ 75 callersFunctionNewFunctionalTestConfig
NewFunctionalTestConfig returns a config meant to be used by functional tests.
functional_test.go:98
↓ 75 callersMethodSetController
(brokerID int32)
mockresponses.go:220
↓ 74 callersMethodFatalf
(string, ...any)
mockresponses.go:15
↓ 72 callersMethodputInt32
(in int32)
packet_encoder.go:16
↓ 71 callersMethodAdd
Add appends elem, growing the buffer if it is full.
internal/queue/queue.go:36
↓ 71 callersMethodgetInt32
()
packet_decoder.go:19
↓ 70 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:592
↓ 66 callersMethodInput
Input is the input channel for the user to write messages to that they wish to send.
async_producer.go:55
↓ 66 callersFunctionsetupFunctionalTest
(t testing.TB)
functional_test.go:502
↓ 66 callersFunctionteardownFunctionalTest
(t testing.TB)
functional_test.go:507
↓ 61 callersMethoddecode
(pd packetDecoder)
encoder_decoder.go:61
↓ 60 callersMethodMessages
Messages returns the read channel for the messages that are returned by the broker.
consumer.go:403
↓ 57 callersFunctiontestResponse
(t *testing.T, name string, res protocolBody, expected []byte)
request_test.go:656
↓ 56 callersMethodversion
()
request.go:13
↓ 55 callersMethodDone
Done should return true when the SCRAM conversation is over.
broker.go:129
↓ 55 callersMethodgetNullableString
()
packet_decoder.go:37
↓ 54 callersFunctionNewAsyncProducer
NewAsyncProducer creates a new AsyncProducer using the given broker addresses and configuration.
async_producer.go:284
↓ 54 callersMethodputNullableString
(in *string)
packet_encoder.go:32
↓ 53 callersMethodAddTopicPartition
testing API
offset_response.go:257
↓ 51 callersFunctioncheckKafkaVersion
(t testing.TB, requiredVersion string)
functional_test.go:462
↓ 49 callersMethodPrintln
(v ...any)
sarama.go:130
↓ 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 callersMethodSetLeader
(topic string, partition, brokerID int32)
mockresponses.go:205
↓ 48 callersMethodputKError
(in KError)
packet_encoder.go:23
↓ 47 callersMethodID
ID returns the broker ID retrieved from Kafka's metadata, or -1 if that is not known.
broker.go:429
↓ 46 callersMethodsendAndReceive
(req protocolBody, res protocolBody)
broker.go:1238
↓ 42 callersMethodLen
()
utils.go:22
↓ 41 callersFunctionNewConsumer
NewConsumer creates a new consumer using the given broker addresses and configuration.
consumer.go:116
↓ 40 callersMethodString
()
utils.go:352
↓ 35 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:190
↓ 34 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
↓ 34 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
↓ 34 callersMethodName
Name uniquely identifies the strategy.
balance_strategy.go:52
↓ 34 callersMethodSetOffset
(topic string, partition int32, time, offset int64)
mockresponses.go:283
↓ 34 callersFunctionencode
Encode takes an Encoder and turns it into bytes while potentially recording metrics.
encoder_decoder.go:21
↓ 33 callersMethodAddr
Addr returns the broker address as either retrieved from Kafka's metadata or passed to NewBroker.
broker.go:434
↓ 32 callersMethodputDurationMs
(in time.Duration)
packet_encoder.go:24
↓ 31 callersFunctionNewMockOffsetResponse
(t TestReporter)
mockresponses.go:276
↓ 31 callersMethodgetDurationMs
()
packet_decoder.go:27
↓ 31 callersMethodputInt64
(in int64)
packet_encoder.go:17
↓ 30 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
↓ 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:26
↓ 29 callersMethodStop
()
functional_consumer_group_test.go:554
↓ 29 callersMethodgetInt64
()
packet_decoder.go:20
↓ 28 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:157
↓ 27 callersMethodSetError
(topic string, partition int32, kerror KError)
mockresponses.go:617
↓ 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 callersMethodputInt8
Primitives
packet_encoder.go:14
↓ 24 callersFunctionNewConfig
NewConfig returns a new configuration instance with sane defaults.
config.go:560
↓ 24 callersMethodPlan
Plan implements BalanceStrategy.
balance_strategy.go:234
↓ 24 callersMethodgetInt16
()
packet_decoder.go:18
↓ 24 callersMethodgetInt8
Primitives
packet_decoder.go:17
↓ 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 callersFunctionNewMockFindCoordinatorResponse
(t TestReporter)
mockresponses.go:498
↓ 23 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:506
↓ 22 callersFunctionverifyPlanIsBalancedAndSticky
(t *testing.T, s *stickyBalanceStrategy, members map[string]ConsumerGroupMemberMetadata, plan BalanceStrategyP
balance_strategy_test.go:2182
↓ 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 callersMethodPartition
Partition takes a message and partition count and chooses a partition
partitioner.go:16
↓ 21 callersFunctionexpectResults
(t *testing.T, p AsyncProducer, successCount, errorCount int)
async_producer_test.go:60
↓ 21 callersMethodgetBool
()
packet_decoder.go:25
↓ 21 callersMethodputBool
(in bool)
packet_encoder.go:22
↓ 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:2108
next →1–100 of 3,837, ranked by callers