Skip to content

Commit

Permalink
fixup: correcting order in cluster.h
Browse files Browse the repository at this point in the history
Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Dec 17, 2024
1 parent 5edde1e commit 6a0edc5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions include/valkey/cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,15 @@ typedef struct {
void *tls;
int (*tls_init_fn)(struct valkeyContext *, struct valkeyTLSContext *);

/* Synchronous API callbacks */
void (*connect_callback)(const valkeyContext *c,
int status);
/* Common callbacks. */
void (*event_callback)(const struct valkeyClusterContext *cc, int event,
void *privdata);
void *event_privdata;

/* Synchronous API callbacks */
void (*connect_callback)(const valkeyContext *c,
int status);

/* Async API event engine adapter. */
int (*attach_fn)(valkeyAsyncContext *ac, void *attach_data);
void *attach_data;
Expand All @@ -195,9 +197,6 @@ valkeyClusterContext *valkeyClusterConnectWithTimeout(const char *addrs,
const struct timeval tv);
void valkeyClusterFree(valkeyClusterContext *cc);

/* Options configurable in runtime. */
int valkeyClusterSetOptionTimeout(valkeyClusterContext *cc, const struct timeval tv);

/* A hook for connect and reconnect attempts, e.g. for applying additional
* socket options. This is called just after connect, before TLS handshake and
* Valkey authentication.
Expand All @@ -218,6 +217,9 @@ int valkeyClusterSetOptionEventCallback(valkeyClusterOptions *options,
int event, void *privdata),
void *privdata);

/* Options configurable in runtime. */
int valkeyClusterSetOptionTimeout(valkeyClusterContext *cc, const struct timeval tv);

/* Blocking
* The following functions will block for a reply, or return NULL if there was
* an error in performing the command.
Expand Down

0 comments on commit 6a0edc5

Please sign in to comment.