Skip to content

Commit

Permalink
client mod
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanbohan committed Jan 12, 2024
1 parent 3b16fe9 commit 073ce6d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ permissions:
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
lint:
if: github.event.pull_request.draft == false
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
Expand Down
6 changes: 3 additions & 3 deletions client.go → client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
greptimepb "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"
"google.golang.org/grpc"

"github.com/GreptimeTeam/greptimedb-ingester-go/client/insert"
"github.com/GreptimeTeam/greptimedb-ingester-go/config"
"github.com/GreptimeTeam/greptimedb-ingester-go/insert"
)

// Client helps to Insert/Query data Into/From GreptimeDB. A Client is safe for concurrent
Expand All @@ -33,8 +33,8 @@ type Client struct {
greptimeClient greptimepb.GreptimeDatabaseClient
}

// NewClient helps to create the greptimedb client, which will be responsible Write/Read data To/From GreptimeDB
func NewClient(cfg *config.Config) (*Client, error) {
// New helps to create the greptimedb client, which will be responsible Write/Read data To/From GreptimeDB
func New(cfg *config.Config) (*Client, error) {
conn, err := grpc.Dial(cfg.GetGRPCAddr(), cfg.DialOptions...)
if err != nil {
return nil, err
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions stream_client.go → client/stream/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package greptime
package stream

import (
"context"

greptimepb "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"
"google.golang.org/grpc"

"github.com/GreptimeTeam/greptimedb-ingester-go/client/insert"
"github.com/GreptimeTeam/greptimedb-ingester-go/config"
"github.com/GreptimeTeam/greptimedb-ingester-go/insert"
)

// StreamClient is only for inserting
Expand All @@ -32,7 +32,7 @@ type StreamClient struct {

// NewStreamClient helps to create a stream insert client.
// If Client has performance issue, you can try the stream client.
func NewStreamClient(cfg *config.Config) (*StreamClient, error) {
func New(cfg *config.Config) (*StreamClient, error) {
conn, err := grpc.Dial(cfg.GetGRPCAddr(), cfg.DialOptions...)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion stream_client_test.go → client/stream/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package greptime
package stream

import (
"testing"
Expand Down

0 comments on commit 073ce6d

Please sign in to comment.