Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DEMO Apps recently implemented
Search
Drumato
August 08, 2021
Programming
0
100
DEMO Apps recently implemented
あるcommunityで発表した雑LT.
Drumato
August 08, 2021
Tweet
Share
More Decks by Drumato
See All by Drumato
仕様と実装で学ぶOpenTelemetry
drumato
2
2.7k
Activities about Kubernetes operation improvements as an SRE
drumato
3
660
Writing an experimental eBPF disassembler
drumato
0
360
An incremental approach to implement an admission controller
drumato
0
250
Components of Kubernetes Cluster
drumato
0
350
cybozu-labs-youth-10th
drumato
1
1.2k
Other Decks in Programming
See All in Programming
How Software Deployment tools have changed in the past 20 years
geshan
0
29k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
7.2k
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
330
Integrating WordPress and Symfony
alexandresalome
0
150
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
170
dotfiles 式年遷宮 令和最新版
masawada
1
770
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Thoughts on Productivity
jonyablonski
73
5k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Statistics for Hackers
jakevdp
799
230k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Producing Creativity
orderedlist
PRO
348
40k
Embracing the Ebb and Flow
colly
88
4.9k
Docker and Python
trallard
47
3.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
RailsConf 2023
tenderlove
30
1.3k
Transcript
最近作ったもの紹介 Drumato
雑談 最近やっていること
Scrapboxになんでもない技術メモ
scrapboxは脳のL1 cacheに良さそう
Controller-runtime Code reading & understanding
本題
最近趣味codingしてない
なまっているか心配
LTのためになんか作る
即席で作ったもの2つ紹介
おもちゃ1
tinetdみたいなのを作る 所要時間: 2~3時間ぐらい
tinet,使わせてもらっています • よくわかっていなくても使える ◦ 適当にREADME読んだら使えました(便利! ◦ Examplesに要件を満たすものが落ちてれば新たに設定書くこともない • Scrap and
Buildがサクサクできる -> 検証に最適! ◦ いちいちVM image落としてきて, confして, FRR installして...とやるのは大変 ◦ Localで動いてすぐ消せる
以下のようなものを作ってみたくなった • なんとなく以下ができたら"楽しそう" ◦ 実行するとup - confを実行 ◦ Signal投げたら勝手にdownする ◦
設定追加したら自動で反映してくれる...? ▪ fileを監視するcodeを書いたことがないので,やってみたい ◦ testが断続的に動いてくれる • 結果的に本家tinetのほうが全然便利,だけど楽しかったのでよし
実装イメージ
Original behavior
tinetd behavior
作る
作り方 • tinet資源は利用せず,1から作る ◦ 理由1: コードが小さくわかりやすかったので十分理解できた ◦ 理由2: 一方でtinetの多機能に全部追従するのは大変そう ◦
結論: コードを読んで最低限の機能を移植すれば良さそう • fsnotifyとかsignalの使い方は勉強 • あとは頑張って作る
結果 • Goで400行くらいで出来た ◦ fsnotify/signal/tickerは使い方はかんたん • 設定とstateの差分でcommand execは意外と大変 ◦ 同じnode
nameはあるが中身は異なるかも -> reflect.DeepEqual() ◦ Nodeが減ってるかも -> map - mapにして差分はdownを実行すればできそう ▪ とりあえず無視
DEMO
None
tinetdから学んだこと • fsnotifyの仕組みはちゃんと知りたいな ◦ まずはinotifyとかから勉強することになるのかな • fsnotifyの用途はなんだろう ◦ "時々fileを開いて読む"で十分なことも多そうなイメージ ◦
Controller-runtimeはtls certificateの監視に使っている • tinetは便利 • それよりnetworkの勉強自体をしなきゃ
おもちゃ2
eBPF disassembler
ありがとうございました