Method returns the method string for the server context. The returned string is in the format of "/service/method".
(ctx context.Context)
| 2203 | // Method returns the method string for the server context. The returned |
| 2204 | // string is in the format of "/service/method". |
| 2205 | func Method(ctx context.Context) (string, bool) { |
| 2206 | s := ServerTransportStreamFromContext(ctx) |
| 2207 | if s == nil { |
| 2208 | return "", false |
| 2209 | } |
| 2210 | return s.Method(), true |
| 2211 | } |
| 2212 | |
| 2213 | // validateSendCompressor returns an error when given compressor name cannot be |
| 2214 | // handled by the server or the client based on the advertised compressors. |