func (s *testService) List(options *ListOptions, stream TestService_ListServer) error { if !limbo.FromGateway(stream.Context()) { panic("not from gateway") } for i, l := options.After, options.After+25; i < l; i++ { stream.Send(&Item{Index: i}) } return nil }
func (s *testService) Greet(ctx context.Context, person *Person) (*Greeting, error) { if !limbo.FromGateway(ctx) { panic("not from gateway") } return &Greeting{Text: fmt.Sprintf("Hello %s!", person.Name)}, nil }