sshpoke/internal/api/plugin/stream.go

16 lines
330 B
Go

package plugin
import (
"github.com/Neur0toxine/sshpoke/pkg/convert"
"github.com/Neur0toxine/sshpoke/pkg/dto"
"github.com/Neur0toxine/sshpoke/pkg/plugin/pb"
)
type Stream struct {
stream pb.PluginService_EventServer
}
func (s *Stream) Send(event dto.Event) error {
return s.stream.Send(convert.AppEventToMessage(event))
}