Skip to content

Commit

Permalink
Expose GetDefaultServerWithConfigAndOpts method
Browse files Browse the repository at this point in the history
  • Loading branch information
bhadreswar-ghuku committed Sep 18, 2024
1 parent 5e86532 commit 9ae7d08
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions orion/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,17 @@ func GetDefaultServer(name string, opts ...DefaultServerOption) Server {
return server
}

// GetDefaultServerWithConfigAndOpts returns a default server object that uses provided configuration
func GetDefaultServerWithConfigAndOpts(config Config, opts ...DefaultServerOption) Server {
server := &DefaultServerImpl{
config: config,
}
for _, opt := range opts {
opt.apply(server)
}
return server
}

// GetDefaultServerWithConfig returns a default server object that uses provided configuration
func GetDefaultServerWithConfig(config Config) Server {
return &DefaultServerImpl{
Expand Down

0 comments on commit 9ae7d08

Please sign in to comment.