Custom Kong Gateway Plugin In Go | Kong Plugin Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 เม.ย. 2021
  • Hey everyone! Today we are building a custom Kong Gateway plugin with Go. This is super simple to do can be a very powerful tool. I hope you enjoy :)
    Useful Links:
    Github: github.com/redhwannacef/youtu...
    Intro to Kong: • Kong Gateway Tutorial ...
    Kong Go Plugin Development: docs.konghq.com/gateway-oss/2...
    Kong Gateway: konghq.com/kong/
    Kong Plugins: docs.konghq.com/hub/
    Music:
    • Plethora
    Huge thank you to Harris Heller for providing copyright-free music.
    Attribution: Icon in thumbnail made by www.freepik.com from www.flaticon.com/
    ------------------------
    Hey everyone! My name is Redhwan Nacef (Red for short). In this channel, I'm hoping to share my thoughts on software engineering, coding, management, and all things tech. I hope you enjoy!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 23

  • @santanathiagosantana2607
    @santanathiagosantana2607 2 ปีที่แล้ว +1

    That's exactly what I was needing!!! Thanks a lot to be sharing it Redhman o/

  • @thechakra6798
    @thechakra6798 3 ปีที่แล้ว +1

    Very clear explanation. keep up the good work Redhwan. Subscribed :)

  • @jimbobjonesification
    @jimbobjonesification 3 ปีที่แล้ว +2

    This was great! Thanks very much…. Would love to see a python one too.

    • @RedhwanNacef
      @RedhwanNacef  3 ปีที่แล้ว

      Thanks, glad you enjoyed it. I don't really have much experience in python so not sure I would be best placed for that, but will definitely look into it!

    • @aydendarian1785
      @aydendarian1785 3 ปีที่แล้ว

      pro trick : watch series on Flixzone. Been using it for watching a lot of movies lately.

    • @malcolmluca7893
      @malcolmluca7893 3 ปีที่แล้ว

      @Ayden Darian yup, I have been watching on Flixzone for months myself :D

    • @gagevincenzo6461
      @gagevincenzo6461 3 ปีที่แล้ว

      @Ayden Darian yup, I've been using flixzone for months myself :D

  • @prashants5930
    @prashants5930 2 ปีที่แล้ว +1

    Helpful ..

  • @aruntyagi1567
    @aruntyagi1567 3 ปีที่แล้ว

    how can I add a header from this plugin to the request?

    • @RedhwanNacef
      @RedhwanNacef  3 ปีที่แล้ว

      I give an example of adding a header at 06:00 using the SetHeader() function, is this what you mean?

    • @aruntyagi1567
      @aruntyagi1567 3 ปีที่แล้ว

      @@RedhwanNacef thanks for the response, but this is in the Response header... I want to append the Request header

    • @RedhwanNacef
      @RedhwanNacef  3 ปีที่แล้ว

      No problem. Ah okay, what is it you are trying to do at a higher level? I ask because in this context, kong is receiving the request so we are only dealing with the response. Any request headers would have been added by the client before sending. So I am a bit confused where you are trying to add a request header?

  • @madeo111
    @madeo111 3 ปีที่แล้ว

    Unfortunately this is not working "plugin not found"

    • @RedhwanNacef
      @RedhwanNacef  3 ปีที่แล้ว

      Happy to try help if you can share your code or provide some more information.

    • @madeo111
      @madeo111 3 ปีที่แล้ว

      @@RedhwanNacef The code is exactly as yours, same configuration, I am using as well docker-compose and the version of the kong image is 2.4.1.0-alpine

    • @madeo111
      @madeo111 3 ปีที่แล้ว +1

      @@RedhwanNacef The problem was that I was building the binary on Ubuntu, I had to build them in Alpine

  • @rubensdinho
    @rubensdinho ปีที่แล้ว +1

    Hi,
    Thank you very much for your video guyz!!! I am getting a little trouble when starting Kong
    kong-gateway | 2022/12/19 21:13:14 [notice] 2184#0: *598 [lua] warmup.lua:43: warming up DNS entries ..., context: ngx.timer
    kong-gateway | 2022/12/19 21:13:14 [notice] 2184#0: *742 [kong] process.lua:259 Starting go-auth, context: ngx.timer
    kong-gateway | 2022/12/19 21:13:14 [crit] 2184#0: *743 connect() to unix:/usr/local/bin/go-auth.socket failed (2: No such file or directory), context: ngx.timer
    kong-gateway | 2022/12/19 21:13:14 [crit] 2184#0: *743 connect() to unix:/usr/local/bin/go-auth.socket failed (2: No such file or directory), context: ngx.timer
    kong-gateway | 2022/12/19 21:13:14 [crit] 2184#0: *743 connect() to unix:/usr/local/bin/go-auth.socket failed (2: No such file or directory), context: ngx.timer
    It seems like I need to add a socket but I don't know where

    • @RedhwanNacef
      @RedhwanNacef  ปีที่แล้ว

      No problem! I hope you found out how to resolve this one.