1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-10-30 23:27:41 +02:00

api honours naming convention of other interfaces

This commit is contained in:
Asim Aslam
2022-07-11 15:49:30 +01:00
parent 7e903d80b6
commit 98375c7ae5
2 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ import (
// The gateway interface provides a way to
// create composable API gateways
type Gateway interface {
type Api interface {
// Initialise options
Init(...Option) error
// Get the options
@@ -172,7 +172,7 @@ func WithEndpoint(e *Endpoint) server.HandlerOption {
return server.EndpointMetadata(e.Name, Encode(e))
}
// NewGateway returns a new api gateway
func NewGateway(opts ...Option) Gateway {
return newGateway(opts...)
// NewApi returns a new api gateway
func NewApi(opts ...Option) Api {
return newApi(opts...)
}

View File

@@ -16,7 +16,7 @@ type api struct {
server server.Server
}
func newGateway(opts ...Option) Gateway {
func newApi(opts ...Option) Api {
options := NewOptions(opts...)
rtr := options.Router