id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
firebase/queries4_501_0.txt |
db.collectionGroup("landmarks").whereEqualTo("type", "museum").get()
.addOnSuccessListener { queryDocumentSnapshots ->
// ...
}
DocSnippets.kt
### Java | |
firebase/firestore-query-filter-compound-multi-eq5_24_0.txt | * Google Cloud Home
* Free Trial and Free Tier
* Architecture Center
* Blog
* Contact Sales
* Google Cloud Developer Center
* Google Developer Center
* Google Cloud Marketplace (in console)
* Google Cloud Marketplace Documentation
* Google Cloud Skills Boost
* Google Cloud Solution Cente... | |
medium/217_37_0.txt | This topic was automatically closed 90 days after the last reply. New replies
are no longer allowed.
← previous page | |
medium/medium_3_3.txt | e of Build function,
Rerun wire command again — or this time we can also run go generate command —
will tell Wire to regenerate the initializing code, and the result is as
follows
Easy, right?
**Final words**
We have presented a simple example of using Wire, demonstrating how it may
help us to build initializing co... | |
medium/217_34_0.txt | ok… so did some testing…
the below is now export CGO_ENABLED=0 | |
medium/15015_5_0.txt | Err.log → Output from above build.
Sending build context to Docker daemon 41.54MB
Step 1/6 : FROM golang:alpine as build-env
---> 14ee78639386
Step 2/6 : RUN apk update && apk add bash ca-certificates git gcc g++ libc-dev
---> Using cache
---> 159487736117
... | |
medium/15015_13_0.txt | so being the noob at this. where do I add the “-tags dynamic” tags.
looking at some dogs it implies with the go build command, but with us doing a
docker build, using a docker file, i never issue a go build command. | |
medium/medium_0_0.txt | [ Open in app
](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2F23cf5cf2fe88&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderUser&source=---two_column_layout_nav----------------------------------)
Sign up
[ Sign in
](/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40pengchen... | |
medium/15015_12_0.txt | Description =========== When using the 1.4.0 release, the bundled _librdkafk
… a_ fails to work as intended with the latest alpine. How to reproduce
================ Build an application which uses
_github.com/confluentinc/confluent-kafka-go_, in a container, using the
alpine:3.11 image (which, at the time of writing,... | |
medium/217_14_0.txt | setting CGO_ENABLED=1 will result in a binary compiled, but then fails due to
libs missing when Lambda executes the binary
G | |
medium/7_8_0.txt |
sudo apt install librdkafka
sudo apt install librdkafka-dev
cd ~/.conan/data
conan install librdkafka/1.6.0@ --build
Then, go back to the EFU-build-directory, execute ` cmake .. ` again, and try
to build the EFU again via ` make -j4 ` . | |
medium/82201_3_0.txt | Makefile
BINARY_NAME=main
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
.DEFAULT_GOAL := deploy
deploy:
go build -o ${BINARY_NAME} .
zip -r function.zip main
aws lambda update-function-code --function-name "S3JSONDecomposer-Golang" --zip-fil... | |
medium/217_4_0.txt | > the base container does not include the libraries
Can you perhaps copy the libs over in one of the build steps? | |
medium/15015_3_0.txt | Anyone seen this, I’m also attaching my docker file.
G | |
medium/medium_4_3.txt | t also supports gRPC. Advanced RPC
protocols like gRPC are well suitable for plugins because they include
versioning out-of-the-box, tackling the difficult interoperability problem
between different versions of plugins vs. the main application.
However, this is also **not a perfect solution** as we talk about the four... | |
medium/15015_24_0.txt | farkhad 16 December 2022 18:58 10
I took this a bit further, since Go requires disk space, and created `
multistage.Dockerfile ` | |
medium/217_10_0.txt | georgelza (George Leonard) July 6, 2023, 12:43pm 19
Thank, will go have a look and see if i can do…
will feed back | |
medium/15015_28_0.txt | 1 Like
OneCricketeer 23 June 2023 03:21 12 | |
medium/15015_27_0.txt | mwtech 22 June 2023 09:51 11
Thank you all, you saved me a lot of time) | |
medium/15015_2_0.txt | Hi all
Please see attached. if I compile my code directly on system, it works, when I
compile/build into a docker images I get errors as per the attached. | |
medium/82201_5_0.txt | I mention again go run main.go works, go mod init and go mod init has been
run.
go build -o main works as well as go build .
it seems to crash when the above makefile is executed.
PS this is being build on a M1 based MAC, but before anyone says that’s the
problem, I’ve copied the code to a amazon linux machine an... | |
medium/217_6_0.txt | Get what you thinking, not sure… I know you give it a zip file, that contains
the main, not sure if that zip can contain requirements and if they can be
copied around.
for me… it also does not make sense… the exe is suppose to be all
encompassing/self contained, otherwise if you copy it from one host to the
next… you ... | |
medium/217_16_0.txt | georgelza (George Leonard) July 6, 2023, 1:54pm 23
Hi there | |
medium/217_30_0.txt | Shaka-Man (Kent Zunker) July 19, 2023, 12:33pm 30
The afore mentioned ‘go build -ldflags=“-extldflags=-static”’ was all that I
used to build no additional scripting. | |
medium/15015_19_0.txt | G
georgelza 16 April 2021 19:57 8 | |
medium/15015_29_0.txt | Also note there are other go native libraries like franz and (now deprecated)
sarama.
### Related Topics | |
medium/15015_15_0.txt | I think next I might try the golang docs, in particular the Docker
information. Maybe start here?
https://hub.docker.com/_/golang | |
medium/7_13_0.txt | #### No local Kafak found (3)
` kafka_check.sh ` might say that ` No local Kafka found ` , after execute `
kafka_start.sh ` without error message. Wait 5 seconds and check again. If
Kafka is still not found, try ` kafka_start.sh ` again, wait and check again.
Normally, Kafka should run now. If Kafka still is not runn... | |
medium/217_0_0.txt | Go Forum
# Go run main works, go build -o main.go fails with GOOS and GOARCH specified | |
medium/217_12_0.txt | … so if i set CGO_ENABLED=0
and then execute | |
medium/7_15_0.txt | Made with Material for MkDocs
| |
medium/medium_3_2.txt | n by creating a file, typically named wire.go. It can be defined in
a separate package, but in this example we will define it at project’s root
directory. But before proceeding to create wire.go, it is better to refactor
some portion of our previous code, especially when creating database
connection instance and regist... | |
medium/7_11_0.txt | #### No local Kafak found (2)
If you get an error related to Kafka like this: | |
medium/15015_25_0.txt |
# syntax=docker/dockerfile:1
## Build
FROM golang:1.19.3-alpine AS build
RUN apk update && apk add gcc g++ libc-dev librdkafka-dev pkgconf
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN go build -tags musl -o myapp... | |
medium/217_36_0.txt |
make deploy
go build -ldflags=“-extldflags=-static -o main .
# runtime/cgo
linux_syscall.c:67:13: error: call to undeclared function 'setresgid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
linux_syscall.c:67:13: note: did you mean 'set... | |
medium/15015_17_0.txt | surely someone else have deployed a go app accessing CP Kafka in K8s. be keen
to see their docker file.
G | |
medium/217_32_0.txt | georgelza (George Leonard) July 19, 2023, 12:40pm 31
hi hi | |
medium/medium_0_1.txt | owever, static linking (including all library
code in the binary) is possible through specific build configurations,
resulting in larger but more self-contained executables.
## Why Builds Can Be Larger with ` CGO_ENABLED=1? `
Enabling cgo ( ` CGO_ENABLED=1 ` ) often leads to larger binaries. This
increase in size is... | |
medium/217_18_0.txt | would really appreciate it if someone that has experience with this would be
willing to jump onto zoom or teams.
G | |
medium/15015_10_0.txt | #### 1.4.0: Building apps fails on latest alpine, when using bundled
librdkafka
opened 09:58PM - 10 Apr 20 UTC | |
medium/217_25_0.txt | Both versions of the code ran with sucess. The statically linked code worked
on a system without the clibs.
The source I used is:
package main
import (
“fmt”
“ github.com/confluentinc/confluent-kafka-go/kafka ”
) | |
medium/7_14_0.txt | Previous Legacy ESS DAQ and EFU
Next Legacy ESS DAQ and DAQuiri | |
medium/7_12_0.txt |
Checking Kafka at ip address 127.0.0.1
Brokers found
checking for local kafka instance
./check_kafka.sh: line 14: netstat: command not found
No local Kafka found
Please install the net-tools: ` sudo apt install net-tools ` | |
medium/15015_6_0.txt | and this above message is repeated probably 50+ times
georgelza 15 April 2021 18:21 2 | |
medium/15015_20_0.txt | checking, but looks like i got it build.
changed
RUN apk update && apk add bash ca-certificates git gcc g++ libc-dev
to
RUN apk update && apk add bash ca-certificates git gcc g++ libc-dev
librdkafka-dev pkgconf | |
medium/15015_16_0.txt | georgelza 16 April 2021 19:03 6
don’t think this is golang related, this is more docker and have feeling the
combination of docker/golang and kafka. | |
medium/217_21_0.txt |
BINARY_NAME=main
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=1
export AWS_REGION=af-south-1
.DEFAULT_GOAL := deploy
deploy:
go build -o ${BINARY_NAME} .
zip -r function.zip main
aws lambda update-function-code --function-name "S3JSON... | |
medium/15015_26_0.txt | Open question: is it possible to avoid loading gcc, g++, etc in Deploy section
of multistage Dockerfile?
1 Like | |
medium/217_15_0.txt | Shaka-Man (Kent Zunker) July 6, 2023, 1:51pm 22
Another alternative would be to refactor your code to utilize a Go native
Kafka package like kafka package - github.com/segmentio/kafka-go - Go
Packages . Not necessarily convenient, but would avoid the CGO. | |
medium/217_7_0.txt | I saw in one of the videos/notes that you can build the docker image that is
used to deploy your app, wondering if that won’t work, in that case instead of
lambda pushing my binary into a image and invoking it, it deploys my provided
image (which is then everything required), but if i think about that, then I’m
heading... | |
medium/15015_7_0.txt | update,
I’ve added “librdkafka-dev pkgconf” to the docker file as modules to pull in,
still getting same errors. | |
medium/217_3_0.txt | christophberger (Christoph Berger) July 4, 2023, 8:30am 15
georgelza: | |
medium/medium_2_4.txt | g-whats-
new-79e2d4b948e4&user=Wayne&userId=befe39d9c51b&source=-----79e2d4b948e4
---------------------clap_footer-----------)
\--
8
[
](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fbookmark%2Fp%2F79e2d4b948e4&operation=register&redirect=https%3A%2F%2Fblog.stackademic.com%2Freact-19-is-
comin... | |
medium/217_31_0.txt | If you are truly trying to cross-compile and cross architecture at the same
time there are a set of problem cross-compiling when C-libs are required to
build for a target. To avoid this build on a like platform. Else look into
xgo command - github.com/kevinho/xgo - Go Packages . This attempts to provide
such functiona... | |
medium/82201_0_0.txt | Confluent Community
# ERROR - Building to deploy to Lambda, please help | |
medium/15015_23_0.txt | God you saved my life georgelza. Thank you so much!
1 Like | |
medium/15015_30_0.txt | Topic | | Replies | Views | Activity
---|---|---|---|---
Golang Code not connecting to topic when containerised Non-Java Clients | 7 | 7687 | 21 April 2021
Client in docker deployed on AWS Lambda Containers | 7 | 1630 | 25 August 2023
Musl-based Linux amd64 and arm64 (Alpine) - without G... | |
medium/medium_2_3.txt | e state with actual data
setState(prevState => ({ …prevState, data: realData }));
});
}
return (
// Render UI using optimisticState
<div>{optimisticState.data}</div>
);
}
**useOptimistic** renders the anticipated result during the asynchronous
o... | |
medium/medium_2_2.txt | not a full-stack framework, you only need to
understand the purpose of these two directives: **use client** and **use
server** mark the “split points” between the front-end and server-side
environments. **use client** instructs the packaging tool to generate a **
<script> ** tag, while **use server** tells the packagin... | |
medium/15015_18_0.txt | georgelza 16 April 2021 19:08 7
… let me add, my other client → receiving app is also golang and inside
docker.
App 1, read text file, do some logic, drop onto Kafka topic.
App 2, consume topic (This app that I have problem with) more logic, and then
send via gRPC to App 3, some more logic and then into a unstru... | |
medium/7_6_0.txt | #### Building the EFU and kafka
Once ` cmake .. ` of the EFU was successful and you try to build it via ` make
` and get an error containing something like this | |
medium/217_38_0.txt | * Home
* Categories
* FAQ/Guidelines
* Terms of Service
* Privacy Policy
Powered by Discourse , best viewed with JavaScript enabled | |
medium/medium_1_0.txt | [ Open in app
](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2Fe81094ee8fa7&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderCollection&source=---two_column_layout_nav----------------------------------)
[ Sign up
](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fblog.s... | |
medium/217_35_0.txt |
make deploy
**Makefile**
BINARY_NAME=main
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=1
export AWS_REGION=af-south-1
.DEFAULT_GOAL := deploy
deploy:
go build -ldflags=“-extldflags=-static -o main .
# jsondecomposer
... | |
medium/217_27_0.txt | Not sure if all this will help on your target system but it passes the basic
tests of being statically linked and executable.
The following was used to build the code: go build
-ldflags=“-extldflags=-static” | |
medium/217_9_0.txt | Shaka-Man (Kent Zunker) July 6, 2023, 12:31pm 18
Consider performing a static link of the Go and C. This article explain in
great detail the process and caveats of doing such a thing. Matt Turner -
Statically Linking Go in 2022
Good luck | |
medium/medium_3_1.txt | ment dependency injection,
especially in a Go application. But before going any further, let us revisit
the basic question of what exactly dependency injection is?
As mentioned previously, [ dependency injection
](https://en.wikipedia.org/wiki/Dependency_injection) is a technique, with its
concern being to ensure that... | |
medium/medium_4_1.txt |
## **Dynamic libraries** —
In Go, Dynamic libraries or shared libraries exist as separate files outside
of the host executable files and are loaded from those shared object files at
runtime. Golang provides this capability in the form of plugins. To understand
this better, let’s convert our static calculator library... | |
medium/15015_22_0.txt | 3 Likes
SuJingyu111 31 October 2022 00:20 9 | |
medium/medium_2_1.txt | d to the criticism of not releasing a new
official version for so long: the features previously released to the Canary
version, due to their interrelated nature, required the React team to invest a
lot of time to ensure they could work together before gradually releasing them
to the Stable version.
Indeed, although no... | |
medium/7_2_0.txt | Initializing search
GitLab | |
medium/217_2_0.txt | Hi there
By having build my binary on a amazonlinux based EC2 I accomplish the very
same,
I’ve also tried building inside a container and I run into the same problems
at the moment.
the base container does not include the libraries, as it seems even if i
follow the static link method, there is some components tha... | |
medium/7_5_0.txt | * Building the EFU and kafka
* No local Kafka found (1)
* No local Kafak found (2)
* No local Kafak found (3)
# Troubleshooting---KAFKA | |
medium/medium_1_1.txt | doing some _copypasta_ in my codes. Later
on, I was in the flow and got the results I wanted. It was like magic!
Then, reality hit when I realized it took me an hour just to get everything
working lined up — aligning my content, tweaking the colors of my graphs, and
adding some fancy shadows. I was pretty happy with ... | |
medium/7_4_0.txt | * Welcome
* Introduction
* Quick start
* Flavours
* Hardware
* Firmware
* Software Software
* Software
* Installation
* Legacy software
* Operating Operating
* Operating Introduction
* Overview
* Troubleshooting Troubleshooting
* Troubleshooting
* Slow Con... | |
medium/217_8_0.txt | georgelza (George Leonard) July 4, 2023, 10:26am 17
bit stuck, looking at the instructions, I’ve build a Dockerfile from the
instructions…
of course when I then run and then invoke the docker container I get the known
problems.
So back to the link, it talks about compiling those libra files by using that
.confi... | |
medium/15015_11_0.txt | closed 10:30AM - 19 Apr 20 UTC
bschofield | |
medium/medium_3_0.txt | [ Open in app
](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2Ff3f2b07af28c&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderCollection&source=---two_column_layout_nav----------------------------------)
[ Sign up
](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Ftoward... | |
medium/15015_0_0.txt | Confluent Community
# Golang app not compiling in docker | |
medium/217_13_0.txt |
go build -ldflags "-linkmode 'external'"
# jsondecom
./main.go:139:14: undefined: kafka.ConfigMap
./main.go:151:25: undefined: kafka.NewProducer
./main.go:241:23: undefined: kafka.Message
./main.go:242:28: undefined: kafka.TopicPartition
./main.go:242:80: undefined: kafka.Partition... | |
medium/217_19_0.txt | Shaka-Man (Kent Zunker) July 6, 2023, 3:12pm 25
Just curious, have you checked the size of the executable when compiling with
and without the link mode? The one compiled with linkmode should be
significantly larger, if not there is another issue. | |
medium/217_28_0.txt | georgelza (George Leonard) July 19, 2023, 7:16am 29
hi there | |
medium/15015_9_0.txt | @georgelza maybe this GH issue has some clues to your compilation issue?
github.com/confluentinc/confluent-kafka-go | |
medium/217_20_0.txt | georgelza (George Leonard) July 6, 2023, 4:34pm 26
so with CGO=1 and =0 the binary is the same size.
below is the make file, | |
medium/15015_21_0.txt | change
RUN go build -o scrubber .
to
RUN go build -tags musl -o scrubber .
G | |
medium/7_1_0.txt | Legacy ESS DAQ and Kafka
* English | |
medium/217_33_0.txt | What i’m doing re the build, i’m building the binary on a AWS Linux Instance,
to try and remove “murphy” from the game.
will give this a try when i have a second, will feed back,
thanks.
G
georgelza (George Leonard) July 24, 2023, 6:03pm 32 | |
medium/217_26_0.txt | func main() {
// producer config
config := &kafka.ConfigMap{
“bootstrap.servers”: “10.1.10.56:29092”, // kafka broker addr
}
topic := “coordinates” // target topic name
// Create Kafka producer
producer, err := kafka.NewProducer(config)
if err != nil {
panic(err)
}
// write 10 messages to the “coor... | |
medium/217_1_0.txt | Getting Help
georgelza (George Leonard) July 4, 2023, 7:33am 14 | |
medium/217_22_0.txt | re this… I tried… using the below confluent kafka producer configuration. if
you can maybe try specifying the same params using straight kafka class, as
you said, maybe that will work.
As much as I need the entire deploy into Lambda resolved, my priority is to
get this working, so if we can get around it for now by no... | |
medium/medium_1_3.txt | -i-ve-learned-live-reload-for-go-
apps-e81094ee8fa7&user=Ivan+Ray+Altomera&userId=946793311c8e&source=-----e81094ee8fa7
---------------------subscribe_user-----------)
## [ Written by Ivan Ray Altomera
](https://medium.com/@iraycrafts?source=post_page-----
e81094ee8fa7--------------------------------)
[ 3 Followers ... | |
medium/217_23_0.txt |
cm := kafka.ConfigMap{
"bootstrap.servers": os.Getenv("kafka_bootstrap_servers"),
"broker.version.fallback": "0.10.0.0",
"api.version.fallback.ms": 0,
"client.id": os.Getenv("George"),
"sasl.mechanisms": os.Getenv("kafka_sasl_mechanisms"), // PLA... | |
medium/15015_14_0.txt | G
rick 16 April 2021 15:14 5 | |
medium/7_10_0.txt |
~/essdaq/kafka ~/essdaq/kafka
./check_kafka.sh: line 7: ../config/system.sh: No such file or directory
Checking Kafka at ip address
usage: check_kafka.py [-h] bootstrap_servers
check_kafka.py: error: the following arguments are required: bootstrap_servers
checking for local kafka insta... | |
medium/medium_2_0.txt | [ Open in app
](https://rsci.app.link/?%24canonical_url=https%3A%2F%2Fmedium.com%2Fp%2F79e2d4b948e4&%7Efeature=LoOpenInAppButton&%7Echannel=ShowPostUnderCollection&source=---two_column_layout_nav----------------------------------)
[ Sign up
](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fblog.s... | |
medium/medium_4_4.txt | st_page-----
cbfa99998b28--------------------------------)
[ Careers ](https://medium.com/jobs-at-medium/work-at-
medium-959d1a85284e?source=post_page-----
cbfa99998b28--------------------------------)
[ Blog ](https://blog.medium.com/?source=post_page-----
cbfa99998b28--------------------------------)
[ Privacy ... | |
medium/15015_8_0.txt | G
rick 16 April 2021 11:58 3 | |
medium/medium_3_4.txt | ckend developer, but studied data science
as well.
[ Follow
](https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fsubscribe%2Fuser%2F5384932b8161&operation=register&redirect=https%3A%2F%2Ftowardsdev.com%2Fdependency-
injection-in-go-with-google-
wire-f3f2b07af28c&user=Bagus+Brahmantya&userId=5384932b8... | |
medium/217_17_0.txt | I’ve tried, but ran into problems, the version of kafka that the native
version supports <> the confluent Kafka / CCloud…
for me the problem is yes, confluent… but surely there is a working how to do
this, that works, does not matter which external library is used, at the
moment I’m getting allot of try this. but non... | |
medium/217_11_0.txt | G
georgelza (George Leonard) July 6, 2023, 1:21pm 20 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.