src/client/client.go
func NewFromAddress(addr string, options ...Option) (*APIClient, error) {
	// Apply creation options
	settings := clientSettings{
		maxConcurrentStreams: DefaultMaxConcurrentStreams,
		dialTimeout:          DefaultDialTimeout,
	}
	for _, option := range options {
		if err := option(&settings); err != nil {
			return nil, err
		}
	}
	c := &APIClient{
		addr:    addr,
		caCerts: settings.caCerts,
		limiter: limit.New(settings.maxConcurrentStreams),
	}
	if err := c.connect(settings.dialTimeout); err != nil {
		return nil, err
	}
	return c, nil
}
func NewFromAddress(addr string, options ...Option) (*APIClient, error) {
	// Apply creation options
	settings := clientSettings{
		maxConcurrentStreams: DefaultMaxConcurrentStreams,
		dialTimeout:          DefaultDialTimeout,
	}
	for _, option := range options {
		if err := option(&settings); err != nil {
			return nil, err
		}
	}
	c := &APIClient{
		addr:    addr,
		caCerts: settings.caCerts,
		limiter: limit.New(settings.maxConcurrentStreams),
	}
	if err := c.connect(settings.dialTimeout); err != nil {
		return nil, err
	}
	return c, nil
}
// NewFromAddress constructs a new APIClient for the server at addr.