Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authDB/commit/e6ef6b21866d60e42966c6a3e4e8c65ebd6b20c7?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
7 additions and
5 deletions
internal/transport/grpc/grpc.go
internal/transport/kafka/kafka_writer.go
@ -113,7 +113,7 @@ func (s *AuthDBServer) Registration(ctx context.Context, req *api.RegistrationRe
}
//
log . Printf ( "send code %s to %s ..." , user . msg . Code , user . msg . Email )
log . Printf ( "publication code %s to %s ..." , user . msg . Code , user . msg . Email )
//
err := s . kafkaWriter . WriteMessage ( [ ] byte ( user . Login ) , value )
@ -124,7 +124,7 @@ func (s *AuthDBServer) Registration(ctx context.Context, req *api.RegistrationRe
}
//
log . Printf ( "send code %s to %s completed" , user . msg . Code , user . msg . Email )
log . Printf ( "publication code %s to %s completed" , user . msg . Code , user . msg . Email )
return & api . RegistrationResponse {
Code : user . msg . Code ,
@ -5,6 +5,7 @@ import (
"log"
"net"
"strconv"
"time"
"github.com/segmentio/kafka-go"
)
@ -20,9 +21,10 @@ func NewWriter(ctx context.Context, topic string, address ...string) *KafkaWrite
s := & KafkaWriter {
ctx : ctx ,
writer : & kafka . Writer {
Topic : topic ,
Balancer : & kafka . LeastBytes { } ,
Addr : kafka . TCP ( address ... ) ,
Topic : topic ,
Balancer : & kafka . LeastBytes { } ,
WriteBackoffMax : time . Millisecond * 100 ,
Addr : kafka . TCP ( address ... ) ,
} ,
first : address [ 0 ] ,
topic : topic ,