go
400 means the statucode
Салтыдык
I didn't use the API Gateway, so I won't be able to answer this question
go
It’s okay, but I still appreciate you.
go
what do you use only rpc?
Салтыдык
try to look through the code, maybe you'll find what's wrong
Салтыдык
what do you use only rpc?
grpc, registry, selectors
go
thank you
🎉
400 means the statucode
sudo netstat -tupnl
go
thanks ! i will try later .
go
and i found another problem
go
go
if i use curl to exe this command it will return right response
go
but if i use postman , it return 500 or 400
Roman
https://www.kernel.org/doc/html/v5.1-rc6/networking/msg_zerocopy.html
Alexander
but if i use postman , it return 500 or 400
maybe certificate validation's fault? insomnia have a checkbox to turn verification off
Alexander
Andrey
Внизу там Atom One Dark написано еще
Салтыдык
первой ссылки в гугле будет достаточно
Салтыдык
https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go
Алексей
Как тема и иконки называется, подскажешь плз?
Тема Matherial theme, иконки вместе с ней идут
Roman
go pg так до сих пор и использует строки для enum'ов? https://github.com/go-pg/pg/issues/993 есть у меня один энумирационный тип: type Gender int const ( GenderMale Gender = 1 GenderFemale Gender = 2 ) func (g Gender) String() string { switch g { case GenderMale: return "male" case GenderFemale: return "female" } return "" } func GenderFromString(s string) Gender { switch s { case "male": return GenderMale case "female": return GenderFemale } return Gender(0) } и в Customer моделе у меня имеется соответствующее поле: type Customer struct { tableName meta `sql:"customers"` ID ID `sql:"id,pk,type:varchar(32)"` Gender Gender `sql:"gender,notnull,type:Gender"` } и создаю я этот тип таким образом: create type Gender as enum ('male', 'female') но go-pg разумеется ругается: ERROR #42804 column "gender" is of type gender but expression is of type integer ИМХО строки для энумераций это убожество
Anonymous
ты полагаешь драйвер должен отслеживать имплементацию интерфейса Stringer, а пользователь драйвера догадаться, что ему надо сделать String() в соответсвии с типом постгреса?? Если бы это всё было так, мы все бы слегка пизданулись от раздувания сложности на пустом месте. Ни кому это не надо
go
micro api still not work 😭 i need help bro!
go
go
go
go
go
Sam
Добрый день. Это что значит? fatal error: concurrent map writes
LexsZero
трогаешь одну мапу из разных горутин
Sam
И что делать?
LexsZero
не делать так
Sam
А как делать
LexsZero
каждый мутабельный объект должен владеться одной и ровно одной горутиной
Sam
Ничего не понял, но было очень интересно
Sam
Спасибо
LexsZero
диспетчер пиши которой будет владеть этой мапой и шли ему сообщения чтоб с ней взаимодействовать
LexsZero
ну или мутекс ебани, но это !Ъ
Sam
диспетчер пиши которой будет владеть этой мапой и шли ему сообщения чтоб с ней взаимодействовать
А почему эта ошибка вылезает не сразу? Нужны какие то определенные условия?
LexsZero
https://golang.org/doc/articles/race_detector.html
Салтыдык
it seems like the server wants to know what type of the content you want to receive. Try to provide the request with Content-Type: application/json
Салтыдык
if there's no luck, give us a screenshot of the curl command with -v flag
Sh4de
Ну просто не надо мохаве на микроволновку ставить :) у меня на 2015 с 8гб всё отлично работает.
Ты не поверишь, Федора ваще летает на 2012, стоит рядом с сиеррой. И давай не будем в эту тему, ладно? Я с леопарда на макоси сижу
go
i tried json and json+grpc all failed
go
very upset
hypnopumpia
можно ли сканировать mysql tinyint в булевую переменную?
Sh4de
Hmmm... Which server protocol version? HTTP/2?
go
go
here is the proto file
Sh4de
HTTP/2
go
I'm just getting started these days
Sh4de
Not important. Why go-micro?
Салтыдык
HTTP/2
there is an API Gateway right after grpc server
go
What am I gonna do brother
Салтыдык
idk
Салтыдык
just try debugging this shit)
go
I think go-micro is very amusing
Sh4de
there is an API Gateway right after grpc server
Hehe. I not see that request was sended to gateway
Sam
https://golang.org/doc/articles/race_detector.html
Это все очень круто но эта хрень мне вообще не помогла. А пример как заставить горутины читатьписать одну мапу хрен найдешь, есть, но все не то.
Салтыдык
@nmaxa here we are
Sh4de
It seems like that request was sended to grps service directly
Салтыдык
as far as I can remember, there is a couple of options, like: grpc or json-rpc
Sh4de
Gateway and grps service must to binding on different ports
go
hey ! i find i can successed by this way
go
go
go
but
LexsZero
Это все очень круто но эта хрень мне вообще не помогла. А пример как заставить горутины читатьписать одну мапу хрен найдешь, есть, но все не то.
type mapWrite struct { key, val string } type MapManager struct { data map[string]string writes chan mapWrite // ... } func NewMapManager() { m := &MapManager{ data: make(map[string]string), writes: make(chan mapWrite), } go func() { for w := range(m.writes) { m.data[w.key] = w.val } } return m } func (m *MapManager) Put(key, value string) { m.writes <- mapWrite{key, value} }
go
but if i use postman
go
go
it failed