You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: delayexecutor.go
    path of file: ./repos/go-zero/core/executors
    
    the code of the file until where you have to start completion: package executors

import (
	"sync"
	"time"

	"github.com/zeromicro/go-zero/core/threading"
)

// A DelayExecutor delays a tasks on given delay interval.
type DelayExecutor struct {
	fn        
    
func (de *DelayExecutor) Trigger() {
	de.lock.Lock()
	defer de.lock.Unlock()

	if de.triggered {
		return
	}

	de.triggered = true
	threading.GoSafe(func() {
		timer := time.NewTimer(de.delay)
		defer timer.Stop()
		<-timer.C

		// set triggered to false before calling fn to ensure no triggers are missed.
		de.lock.Lock()
		de.triggered = false
		de.lock.Unlock()
		de.fn()
	})
}