Skip to content

Commit

Permalink
add afterinit to mysql and file plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
linyows committed Oct 4, 2023
1 parent 799f984 commit 73072de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (f *File) writer() (io.Writer, error) {
return f.file, nil
}

func (f *File) AfterInit() {
}

func (f *File) AfterComm(d *warp.AfterCommData) {
writer, err := f.writer()
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions plugin/mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func (m *Mysql) Conn() (*sql.DB, error) {
return m.pool, nil
}

func (m *Mysql) AfterInit() {
}

func (m *Mysql) AfterComm(d *warp.AfterCommData) {
conn, err := m.Conn()
if err != nil {
Expand Down

0 comments on commit 73072de

Please sign in to comment.