code: func (srv *Instance) NewEvent(t lifecycle.Type, opts ...lifecycle.Option) error {
  	opts = append(opts, lifecycle.Component(srv.eventComponent()))
  	opts = append(opts, lifecycle.Identity(srv.cfg.Identity))
  	opts = append(opts, lifecycle.Version(build.Version))
  
  	e, err := lifecycle.New(t, opts...)
  	if err != nil {
  		return err
  	}
  
  	return srv.PublishEvent(e)
  }
docs: // NewEvent creates a new event with the server component and identity set and publishes it