The service we will implement in this section is called the news service. Its job is to keep track of link events, such as link added or link updated, and return new events to users.
Providing and consuming an internal gRPC API
Defining the NewsManager interface
This interface exposes a single GetNews() method. Users may invoke it and receive a list of link events from users they follow. Here is the Go interface and related structs. It doesn't get much simpler: a single method with a request struct with username and token fields, as well as a result struct. The resulting struct contains a list of Event structs with the following information: EventType, Username, Url, and Timestamp:
type NewsManager interface { ...